| 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; |
| if(!(#1#0.{core::Map::containsKey}(#C2){(core::Object?) → core::bool} && (let final core::bool #t2 = b = #1#0.{core::Map::[]}(#C2){(core::Object?) → core::bool?} as{Unchecked} 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; |
| { |
| hoisted core::bool d; |
| if(#3#0.{core::Map::containsKey}(#C2){(core::Object?) → core::bool}) { |
| d = #3#0.{core::Map::[]}(#C2){(core::Object?) → core::bool?} as{Unchecked} 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 #t3; |
| { |
| 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* #t4 = #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 #t5 = 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 #t6 = #t3 = e#case#0 in true) || (#4#1#isSet ?{core::int} #4#1{core::int} : let final core::bool* #t7 = #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 #t8 = 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 #t9 = #t3 = e#case#1 in true)) { |
| core::int e = #t3{core::int}; |
| { |
| core::print(e); |
| } |
| } |
| } |
| } |
| #L2: |
| { |
| final synthesized self::MyMap<core::String, core::bool> /* erasure=core::Map<core::String, core::bool> */ #5#0 = map; |
| { |
| hoisted core::bool e; |
| if(#5#0.{core::Map::containsKey}(#C1){(core::Object?) → core::bool} && (let final core::bool #t10 = e = #5#0.{core::Map::[]}(#C1){(core::Object?) → core::bool?} as{Unchecked} core::bool in true)) { |
| { |
| core::print(e); |
| } |
| } |
| } |
| } |
| } |
| |
| constants { |
| #C1 = 1 |
| #C2 = "foo" |
| #C3 = 2 |
| } |