blob: d06646f5d6a54905cad32819ddaca10f46ae515e [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/infer_type_on_overridden_fields4.dart:17:68: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
// String y = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.x*/ x;
// ^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
final field core::int* x = 2;
synthetic constructor •() self::A*
: 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 extends core::Object implements self::A {
synthetic constructor •() self::B*
: super core::Object::•()
;
get x() core::int*
return 3;
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
}
static method foo() dynamic {
core::String* y = let final Never* #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_type_on_overridden_fields4.dart:17:68: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
String y = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.x*/ x;
^" in new self::B::•().{self::B::x} as{TypeError} core::String*;
core::int* z = new self::B::•().{self::B::x};
}
static method main() → dynamic {}