blob: f775d707761027aa3c2d3d2f04af592a3f85c852 [file] [log] [blame]
library test /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart:16:7: Error: The implementation of 'x' in the non-abstract class 'D' does not conform to its interface.
// class D extends C implements B {}
// ^
// pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart:13:7: Context: The field 'C.x' has type 'int', which does not match the corresponding type, 'num', in the overridden setter, 'D.x'.
// int x = 0;
// ^
// pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart:16:7: Context: This is the overridden method ('x').
// class D extends C implements B {}
// ^
//
import self as self;
import "dart:core" as core;
class B extends core::Object {
covariant-by-declaration field core::num x = 0;
synthetic constructor •() self::B
: super core::Object::•()
;
}
class C extends core::Object {
field core::int x = 0;
synthetic constructor •() self::C
: super core::Object::•()
;
}
class D extends self::C implements self::B {
synthetic constructor •() self::D
: super self::C::•()
;
forwarding-stub set x(covariant-by-declaration core::num value) void
return super.{self::C::x} = value as core::int;
}
static method main() void {}