| library; |
| import self as self; |
| import "dart:core" as core; |
| |
| static method main() → void { |
| #L1: |
| { |
| final synthesized core::List<core::int> #0#0 = core::_GrowableList::_literal3<core::int>(1, 2, 3); |
| { |
| hoisted core::List<core::int> rest; |
| if(#0#0.{core::List::length}{core::int}.{core::num::>=}(#C1){(core::num) → core::bool} && #C2 =={core::num::==}{(core::Object) → core::bool} #0#0.{core::List::[]}(0){(core::int) → core::int} && (let final core::List<core::int> #t1 = rest = #0#0.{core::List::sublist}(1){(core::int, [core::int?]) → core::List<core::int>} in true)) { |
| { |
| self::expect(null, rest); |
| break #L1; |
| } |
| } |
| } |
| { |
| hoisted core::List<core::int> all; |
| if(let final core::List<core::int> #t2 = all = #0#0.{core::List::sublist}(0){(core::int, [core::int?]) → core::List<core::int>} in true) { |
| { |
| self::expect(core::_GrowableList::_literal3<dynamic>(1, 2, 3), all); |
| } |
| } |
| } |
| } |
| #L2: |
| { |
| final synthesized core::List<core::int> #1#0 = core::_GrowableList::_literal3<core::int>(1, 2, 3); |
| { |
| hoisted core::List<core::int> all; |
| if(let final core::List<core::int> #t3 = all = #1#0.{core::List::sublist}(0){(core::int, [core::int?]) → core::List<core::int>} in true) { |
| { |
| self::expect(core::_GrowableList::_literal3<dynamic>(1, 2, 3), all); |
| break #L2; |
| } |
| } |
| } |
| { |
| hoisted core::List<core::int> rest; |
| if(#1#0.{core::List::length}{core::int}.{core::num::>=}(#C1){(core::num) → core::bool} && #C2 =={core::num::==}{(core::Object) → core::bool} #1#0.{core::List::[]}(0){(core::int) → core::int} && (let final core::List<core::int> #t4 = rest = #1#0.{core::List::sublist}(1){(core::int, [core::int?]) → core::List<core::int>} in true)) { |
| { |
| self::expect(null, rest); |
| } |
| } |
| } |
| } |
| #L3: |
| { |
| final synthesized core::List<core::int> #2#0 = core::_GrowableList::_literal3<core::int>(1, 2, 3); |
| synthesized core::int #2#1; |
| synthesized core::bool #2#1#isSet = false; |
| { |
| hoisted core::List<core::int> rest; |
| if((#2#1#isSet ?{core::int} #2#1{core::int} : let final core::bool #t5 = #2#1#isSet = true in #2#1 = #2#0.{core::List::length}{core::int}).{core::num::>=}(#C3){(core::num) → core::bool} && #C2 =={core::num::==}{(core::Object) → core::bool} #2#0.{core::List::[]}(0){(core::int) → core::int} && #C4 =={core::num::==}{(core::Object) → core::bool} #2#0.{core::List::[]}(1){(core::int) → core::int} && (let final core::List<core::int> #t6 = rest = #2#0.{core::List::sublist}(2){(core::int, [core::int?]) → core::List<core::int>} in true)) { |
| { |
| self::expect(null, rest); |
| break #L3; |
| } |
| } |
| } |
| { |
| hoisted core::List<core::int> all; |
| if((#2#1#isSet ?{core::int} #2#1{core::int} : let final core::bool #t7 = #2#1#isSet = true in #2#1 = #2#0.{core::List::length}{core::int}).{core::num::>=}(#C1){(core::num) → core::bool} && (let final core::List<core::int> #t8 = all = #2#0.{core::List::sublist}(1){(core::int, [core::int?]) → core::List<core::int>} in true)) { |
| { |
| self::expect(core::_GrowableList::_literal2<dynamic>(2, 3), all); |
| } |
| } |
| } |
| } |
| #L4: |
| { |
| final synthesized core::List<core::int> #3#0 = core::_GrowableList::_literal3<core::int>(1, 2, 3); |
| synthesized core::int #3#1; |
| synthesized core::bool #3#1#isSet = false; |
| { |
| hoisted core::List<core::int> all; |
| if((#3#1#isSet ?{core::int} #3#1{core::int} : let final core::bool #t9 = #3#1#isSet = true in #3#1 = #3#0.{core::List::length}{core::int}).{core::num::>=}(#C1){(core::num) → core::bool} && (let final core::List<core::int> #t10 = all = #3#0.{core::List::sublist}(1){(core::int, [core::int?]) → core::List<core::int>} in true)) { |
| { |
| self::expect(core::_GrowableList::_literal2<dynamic>(2, 3), all); |
| break #L4; |
| } |
| } |
| } |
| { |
| hoisted core::List<core::int> rest; |
| if((#3#1#isSet ?{core::int} #3#1{core::int} : let final core::bool #t11 = #3#1#isSet = true in #3#1 = #3#0.{core::List::length}{core::int}).{core::num::>=}(#C3){(core::num) → core::bool} && #C2 =={core::num::==}{(core::Object) → core::bool} #3#0.{core::List::[]}(0){(core::int) → core::int} && #C4 =={core::num::==}{(core::Object) → core::bool} #3#0.{core::List::[]}(1){(core::int) → core::int} && (let final core::List<core::int> #t12 = rest = #3#0.{core::List::sublist}(2){(core::int, [core::int?]) → core::List<core::int>} in true)) { |
| { |
| self::expect(null, rest); |
| } |
| } |
| } |
| } |
| } |
| static method expect(core::List<dynamic>? expected, core::List<dynamic> actual) → dynamic { |
| if(expected == null) { |
| if(!(actual == null)) { |
| throw "Unexpected ${actual}"; |
| } |
| return; |
| } |
| if(!(expected{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} actual.{core::List::length}{core::int})) { |
| throw "Expected ${expected{core::List<dynamic>}}, actual ${actual}"; |
| } |
| for (core::int i = 0; i.{core::num::<}(expected{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| if(!(expected{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic} =={core::Object::==}{(core::Object) → core::bool} actual.{core::List::[]}(i){(core::int) → dynamic})) { |
| throw "Expected ${expected{core::List<dynamic>}}, actual ${actual}"; |
| } |
| } |
| } |
| |
| constants { |
| #C1 = 1 |
| #C2 = 6 |
| #C3 = 2 |
| #C4 = 7 |
| } |