| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart:22:13: Error: The parameter 'x' of the method 'D.f4' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f4'. |
| // - 'B' is from 'pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart'. |
| // - 'A' is from 'pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart'. |
| // Change to a supertype of 'A', or, for a covariant parameter, a subtype. |
| // void f4(B x) {} // Not covariant |
| // ^ |
| // pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart:13:8: Context: This is the overridden method ('f4'). |
| // void f4(A x) {} |
| // ^ |
| // |
| // pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart:23:28: Error: The parameter 'x' of the method 'D.f5' has type 'String', which does not match the corresponding type, 'A', in the overridden method, 'C.f5'. |
| // - 'A' is from 'pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart'. |
| // Change to a supertype of 'A', or, for a covariant parameter, a subtype. |
| // void f5(covariant String x) {} |
| // ^ |
| // pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart:14:8: Context: This is the overridden method ('f5'). |
| // void f5(covariant A x) {} |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| class A extends core::Object { |
| synthetic constructor •() → self::A* |
| ; |
| abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode |
| abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf |
| abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf |
| abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue |
| abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse |
| abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::== |
| abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode |
| abstract member-signature method toString() → core::String*; -> core::Object::toString |
| abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod |
| abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType |
| } |
| class B extends self::A { |
| synthetic constructor •() → self::B* |
| ; |
| } |
| class C extends core::Object { |
| synthetic constructor •() → self::C* |
| ; |
| method f1(covariant self::A* x) → void |
| ; |
| method f2(self::A* x) → void |
| ; |
| method f3(covariant self::A* x) → void |
| ; |
| method f4(self::A* x) → void |
| ; |
| method f5(covariant self::A* x) → void |
| ; |
| method f6(covariant self::B* x) → void |
| ; |
| abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode |
| abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf |
| abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf |
| abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue |
| abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse |
| abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::== |
| abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode |
| abstract member-signature method toString() → core::String*; -> core::Object::toString |
| abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod |
| abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType |
| } |
| class D extends self::C { |
| synthetic constructor •() → self::D* |
| ; |
| method f1(covariant self::B* x) → void |
| ; |
| method f2(covariant self::B* x) → void |
| ; |
| method f3(covariant self::B* x) → void |
| ; |
| method f4(self::B* x) → void |
| ; |
| method f5(covariant core::String* x) → void |
| ; |
| method f6(covariant self::A* x) → void |
| ; |
| } |
| static method main() → dynamic |
| ; |