blob: a48dc1afed707d0850eda77807e4410158f7dee6 [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:163: Error: Can't infer the type of 'x': overridden members must all have the same type.
// Specify the type explicitly.
// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
// ^
//
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:163: Error: Can't infer the type of 'x': overridden members must all have the same type.
// Specify the type explicitly.
// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
// ^
//
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:163: Error: Can't infer the type of 'x': overridden members must all have the same type.
// Specify the type explicitly.
// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
// ^
//
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:163: Error: The return type of the method 'F.x' is 'dynamic', which does not match the return type of the overridden method, 'int'.
// Change to a subtype of 'int'.
// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
// ^
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:9:11: Context: This is the overridden method ('x').
// int get x;
// ^
//
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:163: Error: The return type of the method 'F.x' is 'dynamic', which does not match the return type of the overridden method, 'num'.
// Change to a subtype of 'num'.
// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
// ^
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:17:11: Context: This is the overridden method ('x').
// num get x;
// ^
//
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:163: Error: The return type of the method 'G.x' is 'dynamic', which does not match the return type of the overridden method, 'int'.
// Change to a subtype of 'int'.
// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
// ^
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:9:11: Context: This is the overridden method ('x').
// int get x;
// ^
//
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:163: Error: The return type of the method 'G.x' is 'dynamic', which does not match the return type of the overridden method, 'double'.
// Change to a subtype of 'double'.
// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
// ^
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:21:14: Context: This is the overridden method ('x').
// double get x;
// ^
//
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:163: Error: The return type of the method 'H.x' is 'dynamic', which does not match the return type of the overridden method, 'num'.
// Change to a subtype of 'num'.
// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
// ^
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:17:11: Context: This is the overridden method ('x').
// num get x;
// ^
//
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:163: Error: The return type of the method 'H.x' is 'dynamic', which does not match the return type of the overridden method, 'double'.
// Change to a subtype of 'double'.
// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
// ^
// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:21:14: Context: This is the overridden method ('x').
// double get x;
// ^
//
import self as self;
import "dart:core" as core;
abstract class A extends core::Object {
synthetic constructor •() self::A
: super core::Object::•()
;
abstract get x() core::int;
}
abstract class B extends core::Object {
synthetic constructor •() self::B
: super core::Object::•()
;
abstract get x() core::int;
}
abstract class C extends core::Object {
synthetic constructor •() self::C
: super core::Object::•()
;
abstract get x() core::num;
}
abstract class D extends core::Object {
synthetic constructor •() self::D
: super core::Object::•()
;
abstract get x() core::double;
}
class E extends self::A implements self::B {
field core::int x = null;
synthetic constructor •() self::E
: super self::A::•()
;
}
class F extends self::A implements self::C {
field dynamic x = null;
synthetic constructor •() self::F
: super self::A::•()
;
}
class G extends self::A implements self::D {
field dynamic x = null;
synthetic constructor •() self::G
: super self::A::•()
;
}
class H extends self::C implements self::D {
field dynamic x = null;
synthetic constructor •() self::H
: super self::C::•()
;
}
static method main() dynamic {}