| library; |
| import self as self; |
| import "dart:core" as core; |
| |
| abstract class A extends core::Object { |
| synthetic constructor •() → self::A |
| : super core::Object::•() |
| ; |
| method noSuchMethod(core::Invocation i) → dynamic { |
| if(i.{core::Invocation::memberName}{core::Symbol} =={core::Symbol::==}{(core::Object) → core::bool} #C1) { |
| return i.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(#C2){(core::Object?) → dynamic}; |
| } |
| else |
| if(i.{core::Invocation::memberName}{core::Symbol} =={core::Symbol::==}{(core::Object) → core::bool} #C3) { |
| return i.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic}; |
| } |
| return null; |
| } |
| abstract method foo({core::String bar = #C4}) → core::String; |
| abstract method hest([core::int fisk = #C5]) → core::int; |
| } |
| class B extends self::A { |
| synthetic constructor •() → self::B |
| : super self::A::•() |
| ; |
| no-such-method-forwarder method foo({core::String bar = #C4}) → core::String |
| return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C6, #C7, core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#C2: bar}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String; |
| no-such-method-forwarder method hest([core::int fisk = #C5]) → core::int |
| return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C6, core::List::unmodifiable<dynamic>(<dynamic>[fisk]), core::Map::unmodifiable<core::Symbol, dynamic>(#C8))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int; |
| } |
| static method main() → dynamic { |
| self::B b = new self::B::•(); |
| dynamic value; |
| if(!((value = b.{self::B::foo}(){({bar: core::String}) → core::String}) =={core::String::==}{(core::Object) → core::bool} "baz")) { |
| throw "Unexpected value: '${value}'; expected 'baz'."; |
| } |
| if(!((value = b.{self::B::hest}(){([core::int]) → core::int}) =={core::num::==}{(core::Object) → core::bool} 42)) { |
| throw "Unexpected value: '${value}'; expected '42'."; |
| } |
| } |
| |
| constants { |
| #C1 = #foo |
| #C2 = #bar |
| #C3 = #hest |
| #C4 = "baz" |
| #C5 = 42 |
| #C6 = <core::Type>[] |
| #C7 = <dynamic>[] |
| #C8 = <core::Symbol, dynamic>{} |
| } |