blob: 252bf92ae2b2afbfe1b35e934b83eea094307704 [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:21:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
// s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.y*/ y;
// ^
//
// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
// s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.w*/ w;
// ^
//
// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:61: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// i = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.z*/ z;
// ^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
field dynamic x = null;
field core::int* y = 2;
field core::String* z = "hi";
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 {
field dynamic x = 2;
field core::int* y = 3;
field core::String* z = null;
field core::int* w = 2;
synthetic constructor •() self::B*
: 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
}
static method foo() dynamic {
core::String* s;
core::int* i;
s = new self::B::•().{self::B::x} as{TypeError,ForDynamic} core::String*;
s = let final Never* #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:21:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.y*/ y;
^" in new self::B::•().{self::B::y} as{TypeError} core::String*;
s = new self::B::•().{self::B::z};
s = let final Never* #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.w*/ w;
^" in new self::B::•().{self::B::w} as{TypeError} core::String*;
i = new self::B::•().{self::B::x} as{TypeError,ForDynamic} core::int*;
i = new self::B::•().{self::B::y};
i = let final Never* #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:61: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
i = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B.z*/ z;
^" in new self::B::•().{self::B::z} as{TypeError} core::int*;
i = new self::B::•().{self::B::w};
}
static method main() → dynamic {}