blob: 17b3d29545a11bf752c55c9fd8d5822960b44841 [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart:18:73: Error: A value of type 'String' can't be assigned to a variable of type '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::•()
;
abstract member-signature get _identityHashCode() core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) core::bool*; -> core::Object::==
abstract member-signature get hashCode() core::int*; -> core::Object::hashCode
abstract member-signature method toString() core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() core::Type*; -> core::Object::runtimeType
}
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:73: Error: A value of type 'String' can't be assigned to a variable of type '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();
}