blob: f6074a4ad9de3df31c7fe80a9afd4160a44a5d2a [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart:18:74: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// int y = /*error:INVALID_ASSIGNMENT*/ new B<String>(). /*@target=B::x*/ x;
// ^
//
import self as self;
import "dart:core" as core;
class A<T extends core::Object = dynamic> extends core::Object {
generic-covariant-impl field self::A::T x = null;
synthetic constructor •() self::A<self::A::T>
: super core::Object::•()
;
}
class B<E extends core::Object = dynamic> extends self::A<self::B::E> {
generic-covariant-impl field self::B::E y = null;
synthetic constructor •() self::B<self::B::E>
: super self::A::•()
;
get x() self::B::E
return this.{self::B::y};
}
static method foo() dynamic {
core::int y = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart:18:74: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
int y = /*error:INVALID_ASSIGNMENT*/ new B<String>(). /*@target=B::x*/ x;
^" in new self::B::•<core::String>().{self::B::x} as{TypeError} core::int;
core::String z = new self::B::•<core::String>().{self::B::x};
}
static method main() → dynamic {
self::foo();
}