| // Formatted problems: |
| // |
| // pkg/front_end/testcases/override_check_basic.dart:29:52: Error: The return type of the method 'E::f4' is 'dart.core::Object', which does not match the return type of the overridden method, '#lib1::A'. |
| // Change to a subtype of '#lib1::A'. |
| // Object /*@error=OverrideTypeMismatchReturnType*/ f4() {} |
| // ^ |
| // pkg/front_end/testcases/override_check_basic.dart:15:5: Context: This is the overridden method ('f4'). |
| // A f4() {} |
| // ^ |
| // |
| // pkg/front_end/testcases/override_check_basic.dart:28:55: Error: The parameter 'x' of the method 'E::f3' has type '#lib1::B', which does not match the corresponding type in the overridden method, '#lib1::A'. |
| // Change to a supertype of '#lib1::A', or, for a covariant parameter, a subtype. |
| // void f3({B /*@error=OverrideTypeMismatchParameter*/ x}) {} |
| // ^ |
| // pkg/front_end/testcases/override_check_basic.dart:14:8: Context: This is the overridden method ('f3'). |
| // void f3({A x}) {} |
| // ^ |
| // |
| // pkg/front_end/testcases/override_check_basic.dart:26:54: Error: The parameter 'x' of the method 'E::f1' has type '#lib1::B', which does not match the corresponding type in the overridden method, '#lib1::A'. |
| // Change to a supertype of '#lib1::A', or, for a covariant parameter, a subtype. |
| // void f1(B /*@error=OverrideTypeMismatchParameter*/ x) {} |
| // ^ |
| // pkg/front_end/testcases/override_check_basic.dart:12:8: Context: This is the overridden method ('f1'). |
| // void f1(A x) {} |
| // ^ |
| // |
| // pkg/front_end/testcases/override_check_basic.dart:27:55: Error: The parameter 'x' of the method 'E::f2' has type '#lib1::B', which does not match the corresponding type in the overridden method, '#lib1::A'. |
| // Change to a supertype of '#lib1::A', or, for a covariant parameter, a subtype. |
| // void f2([B /*@error=OverrideTypeMismatchParameter*/ x]) {} |
| // ^ |
| // pkg/front_end/testcases/override_check_basic.dart:13:8: Context: This is the overridden method ('f2'). |
| // void f2([A x]) {} |
| // ^ |
| |
| // Unhandled errors: |
| // |
| // pkg/front_end/testcases/override_check_basic.dart:29:52: Error: The return type of the method 'E::f4' is 'dart.core::Object', which does not match the return type of the overridden method, '#lib1::A'. |
| // Change to a subtype of '#lib1::A'. |
| // Object /*@error=OverrideTypeMismatchReturnType*/ f4() {} |
| // ^ |
| // |
| // pkg/front_end/testcases/override_check_basic.dart:28:55: Error: The parameter 'x' of the method 'E::f3' has type '#lib1::B', which does not match the corresponding type in the overridden method, '#lib1::A'. |
| // Change to a supertype of '#lib1::A', or, for a covariant parameter, a subtype. |
| // void f3({B /*@error=OverrideTypeMismatchParameter*/ x}) {} |
| // ^ |
| // |
| // pkg/front_end/testcases/override_check_basic.dart:26:54: Error: The parameter 'x' of the method 'E::f1' has type '#lib1::B', which does not match the corresponding type in the overridden method, '#lib1::A'. |
| // Change to a supertype of '#lib1::A', or, for a covariant parameter, a subtype. |
| // void f1(B /*@error=OverrideTypeMismatchParameter*/ x) {} |
| // ^ |
| // |
| // pkg/front_end/testcases/override_check_basic.dart:27:55: Error: The parameter 'x' of the method 'E::f2' has type '#lib1::B', which does not match the corresponding type in the overridden method, '#lib1::A'. |
| // Change to a supertype of '#lib1::A', or, for a covariant parameter, a subtype. |
| // void f2([B /*@error=OverrideTypeMismatchParameter*/ x]) {} |
| // ^ |
| |
| library; |
| import self as self; |
| import "dart:core" as core; |
| |
| class A extends core::Object { |
| synthetic constructor •() → self::A |
| : super core::Object::•() |
| ; |
| } |
| class B extends self::A { |
| synthetic constructor •() → self::B |
| : super self::A::•() |
| ; |
| } |
| class C extends core::Object { |
| synthetic constructor •() → self::C |
| : super core::Object::•() |
| ; |
| method f1(self::A x) → void {} |
| method f2([self::A x = null]) → void {} |
| method f3({self::A x = null}) → void {} |
| method f4() → self::A {} |
| } |
| class D extends self::C { |
| synthetic constructor •() → self::D |
| : super self::C::•() |
| ; |
| method f1(core::Object x) → void {} |
| method f2([core::Object x = null]) → void {} |
| method f3({core::Object x = null}) → void {} |
| method f4() → self::B {} |
| } |
| class E extends self::C { |
| synthetic constructor •() → self::E |
| : super self::C::•() |
| ; |
| method f1(self::B x) → void {} |
| method f2([self::B x = null]) → void {} |
| method f3({self::B x = null}) → void {} |
| method f4() → core::Object {} |
| } |
| static method main() → dynamic {} |