blob: 8fc4f70118e5125aa24ed5728ba53d8b455b1853 [file] [log] [blame]
// Formatted problems:
//
// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:25:50: Error: The parameter 'value' of the method 'D::x4' 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).
// B /*@error=OverrideTypeMismatchParameter*/ value) {} // Not covariant
// ^
// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:15:12: Context: This is the overridden method ('x4').
// void set x4(A value) {}
// ^
//
// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:27:65: Error: The parameter 'value' of the method 'D::x5' has type dart.core::String, 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).
// covariant String /*@error=OverrideTypeMismatchParameter*/ value) {}
// ^
// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:16:12: Context: This is the overridden method ('x5').
// void set x5(covariant A value) {}
// ^
// Unhandled errors:
//
// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:25:50: Error: The parameter 'value' of the method 'D::x4' 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).
// B /*@error=OverrideTypeMismatchParameter*/ value) {} // Not covariant
// ^
//
// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:27:65: Error: The parameter 'value' of the method 'D::x5' has type dart.core::String, 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).
// covariant String /*@error=OverrideTypeMismatchParameter*/ value) {}
// ^
library;
import self as self;
import "dart:core" as core;
class A extends core::Object {
synthetic constructor •() self::A
: super core::Object::•()
;
}
class B extends self::A {
synthetic constructor •() self::B
: super self::A::•()
;
}
class C extends core::Object {
synthetic constructor •() self::C
: super core::Object::•()
;
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
: super self::C::•()
;
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 {}