| library /*isNonNullableByDefault*/; |
| import self as self; |
| import "dart:core" as core; |
| |
| static method test(dynamic x1, dynamic x2) → dynamic { |
| final dynamic #t1 = x1; |
| { |
| dynamic y = #t1; |
| } |
| final dynamic #t2 = x1; |
| { |
| dynamic y = #t2; |
| { |
| final dynamic #t3 = x2; |
| { |
| dynamic y = #t3; |
| { |
| return y; |
| } |
| } |
| } |
| } |
| throw "Expected to never reach this line of the program."; |
| } |
| static method main() → dynamic { |
| self::expectEquals(self::test(1, 2), 2); |
| } |
| static method expectEquals(dynamic x, dynamic y) → dynamic { |
| if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) { |
| throw "Expected ${x} and ${y} to be equal."; |
| } |
| } |