| library; |
| import self as self; |
| import "dart:core" as core; |
| |
| abstract class A<X extends core::Object? = dynamic> extends core::Object { |
| covariant-by-class field core::List<self::A::X%>? foo = null; |
| synthetic constructor •() → self::A<self::A::X%> |
| : super core::Object::•() |
| ; |
| } |
| class B extends core::Object implements self::A<core::int> { |
| synthetic constructor •() → self::B |
| : super core::Object::•() |
| ; |
| method noSuchMethod(core::Invocation i) → dynamic |
| return <dynamic>[]; |
| no-such-method-forwarder get foo() → core::List<core::int>? |
| return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::List<core::int>?; |
| no-such-method-forwarder set foo(covariant-by-class core::List<core::int>? value) → void |
| return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol, dynamic>(#C4))){(core::Invocation) → dynamic}; |
| } |
| static method expectTypeError(() → dynamic callback) → void { |
| try { |
| callback(){() → dynamic}; |
| throw "Expected TypeError, did not occur"; |
| } |
| on core::TypeError catch(no-exception-var) { |
| } |
| } |
| static method main() → dynamic { |
| self::B b = new self::B::•(); |
| self::expectTypeError(() → core::List<core::int>? => b.{self::B::foo}{core::List<core::int>?}); |
| self::expectTypeError(() → core::List<dynamic> => (b as dynamic).{dynamic}foo = <dynamic>[]); |
| } |
| |
| constants { |
| #C1 = #foo |
| #C2 = <core::Type>[] |
| #C3 = <dynamic>[] |
| #C4 = <core::Symbol, dynamic>{} |
| #C5 = #foo= |
| } |