blob: 1079542add49e8643fc6e5afea504a74e0bbf2c6 [file] [log] [blame]
// 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 {}