| library; |
| import self as self; |
| import "dart:core" as core; |
| |
| class Expect extends core::Object { |
| synthetic constructor •() → self::Expect |
| : super core::Object::•() |
| ; |
| static method equals(dynamic x, dynamic y) → void { |
| if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) { |
| throw "Expected two equal values, got '${x}' and '${y}'."; |
| } |
| } |
| static method isTrue(core::bool b) → void { |
| if(!b) { |
| throw "Expected condition to be true, but got false."; |
| } |
| } |
| } |
| extension type ET(core::Object? _) { |
| abstract extension-type-member representation-field get _() → core::Object?; |
| method call = self::ET|call; |
| method tearoff call = self::ET|get#call; |
| constructor • = self::ET|constructor#; |
| constructor tearoff • = self::ET|constructor#_#new#tearOff; |
| } |
| static extension-type-member method ET|constructor#(core::Object? _) → self::ET% /* erasure=core::Object?, declared=! */ { |
| lowered final self::ET% /* erasure=core::Object?, declared=! */ #this = _; |
| return #this; |
| } |
| static extension-type-member method ET|constructor#_#new#tearOff(core::Object? _) → self::ET% /* erasure=core::Object?, declared=! */ |
| return self::ET|constructor#(_); |
| static extension-type-member method ET|call(lowered final self::ET% /* erasure=core::Object?, declared=! */ #this) → core::String |
| return "ET"; |
| static extension-type-member method ET|get#call(lowered final self::ET% /* erasure=core::Object?, declared=! */ #this) → () → core::String |
| return () → core::String => self::ET|call(#this); |
| static method func(core::Function callable) → core::Function |
| return callable; |
| static method main() → void { |
| self::ET% /* erasure=core::Object?, declared=! */ et = self::ET|constructor#(null); |
| self::Expect::isTrue(self::func(self::ET|get#call(et)) is core::Function); |
| self::Expect::isTrue(self::ET|get#call(et) is core::Function); |
| self::Expect::equals(self::func(self::ET|get#call(et))(), self::ET|call(et)); |
| self::Expect::equals(self::func(self::ET|get#call(et))(), "ET"); |
| } |