blob: c042245539a757db9e884e29f472470699aa0ace [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart:22:17: Error: The parameter 'value' of the method 'D.x4' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.x4'.
// - 'B' is from 'pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart'.
// - 'A' is from 'pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart'.
// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
// void set x4(B value) {} // Not covariant
// ^
// pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart:13:12: Context: This is the overridden method ('x4').
// void set x4(A value) {}
// ^
//
// pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart:23:32: Error: The parameter 'value' of the method 'D.x5' has type 'String', which does not match the corresponding type, 'A', in the overridden method, 'C.x5'.
// - 'A' is from 'pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart'.
// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
// void set x5(covariant String value) {}
// ^
// pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart:14:12: Context: This is the overridden method ('x5').
// void set x5(covariant A value) {}
// ^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
synthetic constructor •() self::A*
;
}
class B extends self::A {
synthetic constructor •() self::B*
;
}
class C extends core::Object {
synthetic constructor •() self::C*
;
set x1(covariant self::A* value) void
;
set x2(self::A* value) void
;
set x3(covariant self::A* value) void
;
set x4(self::A* value) void
;
set x5(covariant self::A* value) void
;
set x6(covariant self::B* value) void
;
}
class D extends self::C {
synthetic constructor •() self::D*
;
set x1(covariant self::B* value) void
;
set x2(covariant self::B* value) void
;
set x3(covariant self::B* value) void
;
set x4(self::B* value) void
;
set x5(covariant core::String* value) void
;
set x6(covariant self::A* value) void
;
}
static method main() dynamic
;