| library /*isNonNullableByDefault*/; |
| import self as self; |
| import "dart:core" as core; |
| |
| static final field core::bool inSoundMode = !(<core::int?>[] is{ForNonNullableByDefault} core::List<core::int>); |
| static method main() → dynamic { |
| try { |
| throw (null as{ForNonNullableByDefault} dynamic) as{TypeError,ForNonNullableByDefault} core::Object; |
| } |
| on core::NullThrownError catch(final core::NullThrownError e) { |
| if(self::inSoundMode) { |
| throw "Expected TypeError"; |
| } |
| else { |
| core::print("${e.{core::Object::runtimeType}{core::Type}}:${e}"); |
| } |
| } |
| on core::TypeError catch(final core::TypeError e) { |
| if(self::inSoundMode) { |
| core::print("${e.{core::Object::runtimeType}{core::Type}}:${e}"); |
| } |
| else { |
| throw "Expected NullThrowError"; |
| } |
| } |
| } |
| |
| |
| Extra constant evaluation status: |
| Evaluated: AsExpression @ org-dartlang-testcase:///issue49198.dart:9:16 -> NullConstant(null) |
| Extra constant evaluation: evaluated: 19, effectively constant: 1 |