blob: 412283f43696a656f1dfd667972b7f683d30153b [file] [log] [blame]
library test;
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 •() void
: 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 •() void
: super self::A::•()
;
get x() self::B::E
return this.{self::B::y};
}
static method foo() dynamic {
core::int y = let<BottomType> _ = null in let final dynamic #t1 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart:18:74: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'.
int y = /*error:INVALID_ASSIGNMENT*/ new B<String>(). /*@target=B::x*/ x;
^" in let final core::String #t2 = new self::B::•<core::String>().{self::B::x} in null;
core::String z = new self::B::•<core::String>().{self::B::x};
}
static method main() → dynamic {
self::foo();
}