blob: fd0caa97ab3ca8f4a2cc049bf63b11a588c7f608 [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:163: Error: Can't infer a type for 'a' as some of the inherited members have different types.
// Try adding an explicit type.
// get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
// ^
//
// pkg/front_end/testcases/inference/conflicts_can_happen.dart:31:163: Error: Can't infer a type for 'a' as some of the inherited members have different types.
// Try adding an explicit type.
// get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
// ^
//
// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:163: Error: The return type of the method 'C1.a' is 'dynamic', which does not match the return type, 'I1', of the overridden method, 'A.a'.
// - 'I1' is from 'pkg/front_end/testcases/inference/conflicts_can_happen.dart'.
// Change to a subtype of 'I1'.
// get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
// ^
// pkg/front_end/testcases/inference/conflicts_can_happen.dart:17:12: Context: This is the overridden method ('a').
// final I1 a = null;
// ^
//
// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:163: Error: The return type of the method 'C1.a' is 'dynamic', which does not match the return type, 'I2', of the overridden method, 'B.a'.
// - 'I2' is from 'pkg/front_end/testcases/inference/conflicts_can_happen.dart'.
// Change to a subtype of 'I2'.
// get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
// ^
// pkg/front_end/testcases/inference/conflicts_can_happen.dart:21:12: Context: This is the overridden method ('a').
// final I2 a = null;
// ^
//
// pkg/front_end/testcases/inference/conflicts_can_happen.dart:31:163: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I2', of the overridden method, 'B.a'.
// - 'I2' is from 'pkg/front_end/testcases/inference/conflicts_can_happen.dart'.
// Change to a subtype of 'I2'.
// get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
// ^
// pkg/front_end/testcases/inference/conflicts_can_happen.dart:21:12: Context: This is the overridden method ('a').
// final I2 a = null;
// ^
//
// pkg/front_end/testcases/inference/conflicts_can_happen.dart:31:163: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I1', of the overridden method, 'A.a'.
// - 'I1' is from 'pkg/front_end/testcases/inference/conflicts_can_happen.dart'.
// Change to a subtype of 'I1'.
// get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
// ^
// pkg/front_end/testcases/inference/conflicts_can_happen.dart:17:12: Context: This is the overridden method ('a').
// final I1 a = null;
// ^
//
import self as self;
import "dart:core" as core;
class I1 extends core::Object {
field core::int x = null;
synthetic constructor •() self::I1
: super core::Object::•()
;
}
class I2 extends self::I1 {
field core::int y = null;
synthetic constructor •() self::I2
: super self::I1::•()
;
}
class A extends core::Object {
final field self::I1 a = null;
synthetic constructor •() self::A
: super core::Object::•()
;
}
class B extends core::Object {
final field self::I2 a = null;
synthetic constructor •() self::B
: super core::Object::•()
;
}
class C1 extends core::Object implements self::A, self::B {
synthetic constructor •() self::C1
: super core::Object::•()
;
get a() dynamic
return null;
}
class C2 extends core::Object implements self::B, self::A {
synthetic constructor •() self::C2
: super core::Object::•()
;
get a() dynamic
return null;
}
static method main() dynamic {}