blob: cdc0223054d26be40e49729770fc4a5bffe9307f [file] [log] [blame]
// Formatted problems:
//
// pkg/front_end/testcases/override_check_accessor_basic.dart:23:56: Error: The return type of the method 'E::y' 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 get /*@error=OverrideTypeMismatchReturnType*/ y => null;
// ^
// pkg/front_end/testcases/override_check_accessor_basic.dart:13:9: Error: This is the overridden method ('y').
// A get y => null;
// ^
//
// pkg/front_end/testcases/override_check_accessor_basic.dart:22:57: Error: The parameter 'value' of the method 'E::x' 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 set x(B /*@error=OverrideTypeMismatchParameter*/ value) {}
// ^
// pkg/front_end/testcases/override_check_accessor_basic.dart:12:12: Error: This is the overridden method ('x').
// void set x(A value) {}
// ^
// Unhandled errors:
//
// pkg/front_end/testcases/override_check_accessor_basic.dart:23:56: Error: The return type of the method 'E::y' 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 get /*@error=OverrideTypeMismatchReturnType*/ y => null;
// ^
//
// pkg/front_end/testcases/override_check_accessor_basic.dart:22:57: Error: The parameter 'value' of the method 'E::x' 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 set x(B /*@error=OverrideTypeMismatchParameter*/ value) {}
// ^
library;
import self as self;
import "dart:core" as core;
class A extends core::Object {
synthetic constructor •() void
: super core::Object::•()
;
}
class B extends self::A {
synthetic constructor •() void
: super self::A::•()
;
}
class C extends core::Object {
synthetic constructor •() void
: super core::Object::•()
;
set x(self::A value) void {}
get y() self::A
return null;
}
class D extends self::C {
synthetic constructor •() void
: super self::C::•()
;
set x(core::Object value) void {}
get y() self::B
return null;
}
class E extends self::C {
synthetic constructor •() void
: super self::C::•()
;
set x(self::B value) void {}
get y() core::Object
return null;
}
static method main() dynamic {}