| library; |
| import self as self; |
| import "dart:core" as core; |
| |
| static method bar(core::int* a, core::List<core::int*>* b) → dynamic { |
| self::expect(1.{core::int::unary-}(){() →* core::int*}, a); |
| self::expect(1.{core::int::unary-}(){() →* core::int*}, b.{core::List::[]}(0){(core::int*) →* core::int*}.{core::num::-}(2){(core::num*) →* core::int*}); |
| } |
| static method foo(core::int* x) → dynamic async |
| return self::bar(x.{core::num::-}(1){(core::num*) →* core::int*}, !(x == null) ?{core::List<core::int*>*} <core::int*>[x.{core::num::+}(1){(core::num*) →* core::int*}, x.{core::num::+}(2){(core::num*) →* core::int*}, await null] : null); |
| static method main() → void async |
| return await self::foo(0); |
| static method expect(dynamic expected, dynamic actual) → dynamic { |
| if(!(expected =={core::Object::==}{(core::Object*) →* core::bool*} actual)) |
| throw "Expected ${expected}, actual ${actual}"; |
| } |