You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is actually a duplicate of #25368. I'm not quite sure what you mean by strong mode. Before Dart 2 it was a way to enable Dart2-ish type checking, which is more strict than Dart 1 type checking; recently, it has been used to denote the execution of programs with null safety in the sound (and strict) mode where no legacy code can occur in the whole program.
In any case, the issue is that there is an upcast for "1.0" and for 0 because the type of the conditional expression true ? "1.0" : 0 is Object, and then there's an implicit downcast to int. With null safety (and with '--no-implicit-casts`), you will get the compile-time error.
The following code should produce compile time error but still fails at run time:
this is not a duplicate of #25368 since no strong mode is used.
Dart SDK version: 2.9.0-21.0.dev.flutter-20bf2fcf56 (be) (Tue Jul 14 09:46:23 2020 +0000) on "macos_x64"
The text was updated successfully, but these errors were encountered: