Closed
Description
Dart VM version: 2.3.0-dev.0.5.flutter-a1668566e5 (Tue Apr 30 20:35:41 2019 +0200) on "macos_x64"
Dart does not throw compile time error when wrong type is assigned to a variable if you use the "if null" operator. Following example compiles without error and then throws a runtime error:
class ExampleClass {}
void main() {
ExampleClass example = 'string' ?? ExampleClass();
}