blob: 2da0a9716b65bf93bec22e16924d94020fce2f66 [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;
late final synthesized core::int? #0#4 = (#0#0 as{Unchecked} core::Map<core::int, core::int>).{core::Map::[]}(#C1){(core::Object?) → core::int?};
if(#0#0 is core::Map<core::int, core::int> && (!(#0#4 == 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{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;
late final synthesized core::int? #0#4 = (#0#0 as{Unchecked} core::Map<core::int, core::int>).{core::Map::[]}(#C1){(core::Object?) → core::int?};
if(#0#0 is core::Map<core::int, core::int> && (!(#0#4 == 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{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
}