| // Formatted problems: |
| // |
| // pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:163: Error: Can't infer the type of 'a': overridden members must all have the same type. |
| // Specify the type explicitly. |
| // get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a => |
| // ^ |
| // |
| // pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:163: Error: The return type of the method 'C2::a' is dynamic, which does not match the return type of the overridden method (test::I1). |
| // Change to a subtype of test::I1. |
| // get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a => |
| // ^ |
| // pkg/front_end/testcases/inference/conflicts_can_happen2.dart:22:12: Error: This is the overridden method ('a'). |
| // final I1 a = null; |
| // ^ |
| // |
| // pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:163: Error: The return type of the method 'C2::a' is dynamic, which does not match the return type of the overridden method (test::I2). |
| // Change to a subtype of test::I2. |
| // get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a => |
| // ^ |
| // pkg/front_end/testcases/inference/conflicts_can_happen2.dart:26:12: Error: This is the overridden method ('a'). |
| // final I2 a = null; |
| // ^ |
| |
| // Unhandled errors: |
| // |
| // pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:163: Error: Can't infer the type of 'a': overridden members must all have the same type. |
| // Specify the type explicitly. |
| // get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a => |
| // ^ |
| // |
| // pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:163: Error: The return type of the method 'C2::a' is dynamic, which does not match the return type of the overridden method (test::I1). |
| // Change to a subtype of test::I1. |
| // get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a => |
| // ^ |
| // |
| // pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:163: Error: The return type of the method 'C2::a' is dynamic, which does not match the return type of the overridden method (test::I2). |
| // Change to a subtype of test::I2. |
| // get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a => |
| // ^ |
| |
| library test; |
| import self as self; |
| import "dart:core" as core; |
| |
| class I1 extends core::Object { |
| field core::int x = null; |
| synthetic constructor •() → void |
| : super core::Object::•() |
| ; |
| } |
| class I2 extends core::Object { |
| field core::int y = null; |
| synthetic constructor •() → void |
| : super core::Object::•() |
| ; |
| } |
| class I3 extends core::Object implements self::I1, self::I2 { |
| field core::int x = null; |
| field core::int y = null; |
| synthetic constructor •() → void |
| : super core::Object::•() |
| ; |
| } |
| class A extends core::Object { |
| final field self::I1 a = null; |
| synthetic constructor •() → void |
| : super core::Object::•() |
| ; |
| } |
| class B extends core::Object { |
| final field self::I2 a = null; |
| synthetic constructor •() → void |
| : super core::Object::•() |
| ; |
| } |
| class C1 extends core::Object implements self::A, self::B { |
| synthetic constructor •() → void |
| : super core::Object::•() |
| ; |
| get a() → self::I3 |
| return null; |
| } |
| class C2 extends core::Object implements self::A, self::B { |
| synthetic constructor •() → void |
| : super core::Object::•() |
| ; |
| get a() → dynamic |
| return null; |
| } |
| static method main() → dynamic {} |