| library test; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:13:3: Error: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'. |
| // m(x) => x; |
| // ^ |
| // pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:9:5: Context: This is the overridden method ('m'). |
| // T m<T>(T x) => x; |
| // ^ |
| // |
| // pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:13:3: Error: The return type of the method 'D.m' is 'dynamic', which does not match the return type, 'T', of the overridden method, 'C.m'. |
| // Change to a subtype of 'T'. |
| // m(x) => x; |
| // ^ |
| // pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:9:5: Context: This is the overridden method ('m'). |
| // T m<T>(T x) => x; |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| class C extends core::Object { |
| synthetic constructor •() → self::C* |
| ; |
| method m<T extends core::Object* = dynamic>(self::C::m::T* x) → self::C::m::T* |
| ; |
| abstract member-signature get _identityHashCode() → core::int*; |
| abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; |
| abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; |
| abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; |
| abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; |
| abstract member-signature operator ==(dynamic other) → core::bool*; |
| abstract member-signature get hashCode() → core::int*; |
| abstract member-signature method toString() → core::String*; |
| abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; |
| abstract member-signature get runtimeType() → core::Type*; |
| } |
| class D extends self::C { |
| synthetic constructor •() → self::D* |
| ; |
| method m(dynamic x) → dynamic |
| ; |
| } |
| static method main() → dynamic |
| ; |