blob: 8cf7ad19351ac70643a7b1688d87a00cc021f305 [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
extension type MyList<T extends core::Object? = dynamic>(core::List<T%> it) implements core::List<T%> {
abstract extension-type-member representation-field get it() core::List<T%>;
constructor = self::MyList|constructor#;
constructor tearoff = self::MyList|constructor#_#new#tearOff;
}
extension type MyMap<K extends core::Object? = dynamic, V extends core::Object? = dynamic>(core::Map<K%, V%> it) implements core::Map<K%, V%> {
abstract extension-type-member representation-field get it() core::Map<K%, V%>;
constructor = self::MyMap|constructor#;
constructor tearoff = self::MyMap|constructor#_#new#tearOff;
}
static extension-type-member method MyList|constructor#<T extends core::Object? = dynamic>(core::List<self::MyList|constructor#::T%> it) → self::MyList<self::MyList|constructor#::T%> /* erasure=core::List<self::MyList|constructor#::T%> */ {
lowered final self::MyList<self::MyList|constructor#::T%> /* erasure=core::List<self::MyList|constructor#::T%> */ #this = it;
return #this;
}
static extension-type-member method MyList|constructor#_#new#tearOff<T extends core::Object? = dynamic>(core::List<self::MyList|constructor#_#new#tearOff::T%> it) → self::MyList<self::MyList|constructor#_#new#tearOff::T%> /* erasure=core::List<self::MyList|constructor#_#new#tearOff::T%> */
return self::MyList|constructor#<self::MyList|constructor#_#new#tearOff::T%>(it);
static extension-type-member method MyMap|constructor#<K extends core::Object? = dynamic, V extends core::Object? = dynamic>(core::Map<self::MyMap|constructor#::K%, self::MyMap|constructor#::V%> it) → self::MyMap<self::MyMap|constructor#::K%, self::MyMap|constructor#::V%> /* erasure=core::Map<self::MyMap|constructor#::K%, self::MyMap|constructor#::V%> */ {
lowered final self::MyMap<self::MyMap|constructor#::K%, self::MyMap|constructor#::V%> /* erasure=core::Map<self::MyMap|constructor#::K%, self::MyMap|constructor#::V%> */ #this = it;
return #this;
}
static extension-type-member method MyMap|constructor#_#new#tearOff<K extends core::Object? = dynamic, V extends core::Object? = dynamic>(core::Map<self::MyMap|constructor#_#new#tearOff::K%, self::MyMap|constructor#_#new#tearOff::V%> it) → self::MyMap<self::MyMap|constructor#_#new#tearOff::K%, self::MyMap|constructor#_#new#tearOff::V%> /* erasure=core::Map<self::MyMap|constructor#_#new#tearOff::K%, self::MyMap|constructor#_#new#tearOff::V%> */
return self::MyMap|constructor#<self::MyMap|constructor#_#new#tearOff::K%, self::MyMap|constructor#_#new#tearOff::V%>(it);
static method method(self::MyList<core::int> /* erasure=core::List<core::int> */ list, self::MyMap<core::String, core::bool> /* erasure=core::Map<core::String, core::bool> */ map) dynamic {
hoisted has-declared-initializer core::int a;
{
final synthesized self::MyList<core::int> /* erasure=core::List<core::int> */ #0#0 = list;
if(!(#0#0.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final core::int #t1 = a = #0#0.{core::List::[]}(0){(core::int) → core::int} in true)))
throw{for-error-handling} new core::StateError::•("Pattern matching error");
}
hoisted has-declared-initializer core::bool b;
{
final synthesized self::MyMap<core::String, core::bool> /* erasure=core::Map<core::String, core::bool> */ #1#0 = map;
synthesized core::bool? #1#3;
synthesized core::bool #1#3#isSet = false;
if(!((!((#1#3#isSet ?{core::bool?} #1#3{core::bool?} : let final core::bool* #t2 = #1#3#isSet = true in #1#3 = #1#0.{core::Map::[]}(#C2){(core::Object?) → core::bool?}) == null) || null is core::bool && #1#0.{core::Map::containsKey}(#C2){(core::Object?) → core::bool}) && (let final core::bool #t3 = b = let core::bool? #t4 = #1#3#isSet ?{core::bool?} #1#3{core::bool?} : let final core::bool* #t5 = #1#3#isSet = true in #1#3 = #1#0.{core::Map::[]}(#C2){(core::Object?) → core::bool?} in #t4 == null ?{core::bool} #t4 as{Unchecked} core::bool : #t4{core::bool} in true)))
throw{for-error-handling} new core::StateError::•("Pattern matching error");
}
{
final synthesized self::MyList<core::int> /* erasure=core::List<core::int> */ #2#0 = list;
{
hoisted core::int c;
if(#2#0.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1) {
c = #2#0.{core::List::[]}(0){(core::int) → core::int};
{}
}
}
}
{
final synthesized self::MyMap<core::String, core::bool> /* erasure=core::Map<core::String, core::bool> */ #3#0 = map;
synthesized core::bool? #3#3;
synthesized core::bool #3#3#isSet = false;
{
hoisted core::bool d;
if(!((#3#3#isSet ?{core::bool?} #3#3{core::bool?} : let final core::bool* #t6 = #3#3#isSet = true in #3#3 = #3#0.{core::Map::[]}(#C2){(core::Object?) → core::bool?}) == null) || null is core::bool && #3#0.{core::Map::containsKey}(#C2){(core::Object?) → core::bool}) {
d = let core::bool? #t7 = #3#3#isSet ?{core::bool?} #3#3{core::bool?} : let final core::bool* #t8 = #3#3#isSet = true in #3#3 = #3#0.{core::Map::[]}(#C2){(core::Object?) → core::bool?} in #t7 == null ?{core::bool} #t7 as{Unchecked} core::bool : #t7{core::bool};
{}
}
}
}
#L1:
{
final synthesized self::MyList<core::int> /* erasure=core::List<core::int> */ #4#0 = list;
synthesized core::int #4#1;
synthesized core::bool #4#1#isSet = false;
dynamic #t9;
{
lowered hoisted core::int e#case#0;
lowered hoisted core::int e#case#1;
if((#4#1#isSet ?{core::int} #4#1{core::int} : let final core::bool* #t10 = #4#1#isSet = true in #4#1 = #4#0.{core::List::length}{core::int}) =={core::num::==}{(core::Object) → core::bool} #C1 && (let final core::int #t11 = e#case#0 = #4#0.{core::List::[]}(0){(core::int) → core::int} in true) && e#case#0.{core::num::>}(5){(core::num) → core::bool} && (let final core::int #t12 = #t9 = e#case#0 in true) || (#4#1#isSet ?{core::int} #4#1{core::int} : let final core::bool* #t13 = #4#1#isSet = true in #4#1 = #4#0.{core::List::length}{core::int}) =={core::num::==}{(core::Object) → core::bool} #C3 && (let final core::int #t14 = e#case#1 = #4#0.{core::List::[]}(1){(core::int) → core::int} in true) && e#case#1.{core::num::<}(5){(core::num) → core::bool} && (let final core::int #t15 = #t9 = e#case#1 in true)) {
core::int e = #t9{core::int};
{
core::print(e);
}
}
}
}
#L2:
{
final synthesized self::MyMap<core::String, core::bool> /* erasure=core::Map<core::String, core::bool> */ #5#0 = map;
synthesized core::bool? #5#3;
synthesized core::bool #5#3#isSet = false;
{
hoisted core::bool e;
if((!((#5#3#isSet ?{core::bool?} #5#3{core::bool?} : let final core::bool* #t16 = #5#3#isSet = true in #5#3 = #5#0.{core::Map::[]}(#C1){(core::Object?) → core::bool?}) == null) || null is core::bool && #5#0.{core::Map::containsKey}(#C1){(core::Object?) → core::bool}) && (let final core::bool #t17 = e = let core::bool? #t18 = #5#3#isSet ?{core::bool?} #5#3{core::bool?} : let final core::bool* #t19 = #5#3#isSet = true in #5#3 = #5#0.{core::Map::[]}(#C1){(core::Object?) → core::bool?} in #t18 == null ?{core::bool} #t18 as{Unchecked} core::bool : #t18{core::bool} in true)) {
{
core::print(e);
}
}
}
}
}
constants {
#C1 = 1
#C2 = "foo"
#C3 = 2
}
Extra constant evaluation status:
Evaluated: LogicalExpression @ org-dartlang-testcase:///pattern.dart:11:13 -> BoolConstant(false)
Evaluated: LogicalExpression @ org-dartlang-testcase:///pattern.dart:13:22 -> BoolConstant(false)
Evaluated: LogicalExpression @ org-dartlang-testcase:///pattern.dart:20:12 -> BoolConstant(false)
Extra constant evaluation: evaluated: 170, effectively constant: 3