| library /*isNonNullableByDefault*/; |
| import self as self; |
| import "dart:core" as core; |
| |
| class C extends core::Object { |
| field core::String log = ""; |
| constructor •(core::int x, core::int y, {core::int z = #C1}) → self::C |
| : super core::Object::•() { |
| this.{self::C::log} = "x=${x}, y=${y}, z=${z}"; |
| } |
| constructor named1(core::int x, core::int y, core::int z) → self::C |
| : this self::C::•(x, y, z: z) |
| ; |
| } |
| static method main() → dynamic { |
| self::expect("x=1, y=2, z=3", new self::C::•(1, 2, z: 3).{self::C::log}{core::String}); |
| self::expect("x=1, y=2, z=3", new self::C::named1(1, 2, 3).{self::C::log}{core::String}); |
| } |
| static method expect(dynamic expected, dynamic actual) → dynamic { |
| if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual)) |
| throw "Expected ${expected}, actual ${actual}"; |
| } |
| |
| constants { |
| #C1 = 42 |
| } |