blob: fb7df23a98abc43eca6acfc18047843d7b5446a4 [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
static method test1() dynamic {
core::Map<dynamic, dynamic> x = <dynamic, dynamic>{1: 1};
{
final synthesized core::Map<dynamic, dynamic> #0#0 = x;
synthesized core::int? #0#4;
synthesized core::bool #0#4#isSet = false;
if(#0#0 is core::Map<core::int, core::int> && (!((#0#4#isSet ?{core::int?} #0#4{core::int?} : let final dynamic #t1 = #0#4#isSet = true in #0#4 = #0#0{core::Map<core::int, core::int>}.{core::Map::[]}(#C1){(core::Object?) → core::int?}) == null) || null is core::int && #0#0{core::Map<core::int, core::int>}.{core::Map::containsKey}(#C1){(core::Object?) → core::bool}) && #C1 =={core::num::==}{(core::Object) → core::bool} (#0#4#isSet ?{core::int?} #0#4{core::int?} : let final dynamic #t2 = #0#4#isSet = true in #0#4 = #0#0{core::Map<core::int, core::int>}.{core::Map::[]}(#C1){(core::Object?) → core::int?}) as{Unchecked} core::int) {
return 1;
}
else {
return 0;
}
}
}
static method test2() dynamic {
core::Map<dynamic, dynamic> x = <core::int, core::int>{1: 1, 2: 2};
{
final synthesized core::Map<dynamic, dynamic> #0#0 = x;
synthesized core::int? #0#4;
synthesized core::bool #0#4#isSet = false;
if(#0#0 is core::Map<core::int, core::int> && (!((#0#4#isSet ?{core::int?} #0#4{core::int?} : let final dynamic #t3 = #0#4#isSet = true in #0#4 = #0#0{core::Map<core::int, core::int>}.{core::Map::[]}(#C1){(core::Object?) → core::int?}) == null) || null is core::int && #0#0{core::Map<core::int, core::int>}.{core::Map::containsKey}(#C1){(core::Object?) → core::bool}) && #C1 =={core::num::==}{(core::Object) → core::bool} (#0#4#isSet ?{core::int?} #0#4{core::int?} : let final dynamic #t4 = #0#4#isSet = true in #0#4 = #0#0{core::Map<core::int, core::int>}.{core::Map::[]}(#C1){(core::Object?) → core::int?}) as{Unchecked} core::int) {
return 0;
}
else {
return 1;
}
}
}
static method main() dynamic {
self::expectEquals(0, self::test1());
self::expectEquals(0, self::test2());
}
static method expectEquals(dynamic x, dynamic y) dynamic {
if(!(x =={core::Object::==}{(core::Object) core::bool} y)) {
throw "Expected ${x} to be equal to ${y}.";
}
}
constants {
#C1 = 1
}