blob: 4d57d4a2c44e8aa4623e4de8be3a9d616cfdfdb2 [file] [log] [blame]
library test /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/inference_new/static_assign_combiner.dart:28:7: Error: The type 'A' of the getter 'target' is not a subtype of the type 'B' of the setter 'target'.
// - 'A' is from 'pkg/front_end/testcases/inference_new/static_assign_combiner.dart'.
// - 'B' is from 'pkg/front_end/testcases/inference_new/static_assign_combiner.dart'.
// A get target => throw '';
// ^^^^^^
// pkg/front_end/testcases/inference_new/static_assign_combiner.dart:30:10: Context: This is the declaration of the setter 'target'.
// void set target(B value) {}
// ^^^^^^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
synthetic constructor •() self::A
: super core::Object::•()
;
operator +(core::int value) self::C
return throw "";
operator *(self::D value) self::C
return throw "";
}
class B extends core::Object {
synthetic constructor •() self::B
: super core::Object::•()
;
operator +(core::int value) self::E
return throw "";
operator *(self::F value) self::E
return throw "";
}
class C extends self::B {
synthetic constructor •() self::C
: super self::B::•()
;
}
class D extends core::Object {
synthetic constructor •() self::D
: super core::Object::•()
;
}
class E extends core::Object {
synthetic constructor •() self::E
: super core::Object::•()
;
}
class F extends core::Object {
synthetic constructor •() self::F
: super core::Object::•()
;
}
static method f<T extends core::Object? = dynamic>() self::f::T%
return throw "";
static get target() self::A
return throw "";
static set target(self::B value) void {}
static method test1() void {
self::target = self::target.{self::A::*}(self::f<self::D>()){(self::D) self::C};
self::C x = self::target = self::target.{self::A::*}(self::f<self::D>()){(self::D) self::C};
}
static method test2() void {
self::target = self::target.{self::A::+}(1){(core::int) self::C};
self::C x = self::target = self::target.{self::A::+}(1){(core::int) self::C};
}
static method test3() void {
self::target = self::target.{self::A::+}(1){(core::int) self::C};
self::A x = let final self::A #t1 = self::target in let final self::C #t2 = self::target = #t1.{self::A::+}(1){(core::int) → self::C} in #t1;
}
static method main() dynamic {}