| library /*isNonNullableByDefault*/; |
| import self as self; |
| import "dart:core" as core; |
| |
| static method test1() → dynamic { |
| core::num b = 0; |
| b as{ForNonNullableByDefault} core::int; |
| b{core::int}.{core::int::isEven}{core::bool}; |
| block { |
| core::num #t1; |
| final synthesized dynamic #0#0 = (3.14); |
| if(!(let final core::double #t2 = #t1 = #0#0{(core::double)}.$1{core::double} in true)) |
| throw new core::StateError::•("Pattern matching error"); |
| b = #t1; |
| } =>#0#0; |
| return b; |
| } |
| static method test2() → dynamic { |
| core::num b = 0; |
| b as{ForNonNullableByDefault} core::int; |
| b{core::int}.{core::int::isEven}{core::bool}; |
| block { |
| core::num #t3; |
| final synthesized dynamic #0#0 = (3.14, {foo: "foo"}); |
| if(!(let final core::double #t4 = #t3 = #0#0{(core::double, {foo: core::String})}.$1{core::double} in true)) |
| throw new core::StateError::•("Pattern matching error"); |
| b = #t3; |
| } =>#0#0; |
| return b; |
| } |
| static method test3() → dynamic { |
| core::num b = 0; |
| b as{ForNonNullableByDefault} core::int; |
| b{core::int}.{core::int::isEven}{core::bool}; |
| block { |
| core::num #t5; |
| final synthesized dynamic #0#0 = ({foo: 3.14}); |
| if(!(let final core::double #t6 = #t5 = #0#0{({foo: core::double})}.foo{core::double} in true)) |
| throw new core::StateError::•("Pattern matching error"); |
| b = #t5; |
| } =>#0#0; |
| return b; |
| } |
| |
| |
| Extra constant evaluation status: |
| Evaluated: RecordLiteral @ org-dartlang-testcase:///issue51587.dart:9:10 -> RecordConstant(const (3.14)) |
| Evaluated: RecordLiteral @ org-dartlang-testcase:///issue51587.dart:17:17 -> RecordConstant(const (3.14, {foo: "foo"})) |
| Evaluated: RecordLiteral @ org-dartlang-testcase:///issue51587.dart:25:14 -> RecordConstant(const ({foo: 3.14})) |
| Extra constant evaluation: evaluated: 51, effectively constant: 3 |