blob: ab91a2b72e971592f94a606693c6c03435a756bb [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:13:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// a = /*error:INVALID_ASSIGNMENT*/ "hi";
// ^
//
// pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:16:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// b = /*error:INVALID_ASSIGNMENT*/ "hi";
// ^
//
// pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:19:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// c = /*error:INVALID_ASSIGNMENT*/ "hi";
// ^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
field core::int* x = 0;
field core::int* y = null;
final field core::int* z = 42;
synthetic constructor •() self::A*
: super core::Object::•()
;
method test1() dynamic {
core::int* a = this.{self::A::x};
a = let final Never* #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:13:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
a = /*error:INVALID_ASSIGNMENT*/ \"hi\";
^" in "hi" as{TypeError} core::int*;
a = 3;
core::int* b = this.{self::A::y};
b = let final Never* #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:16:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
b = /*error:INVALID_ASSIGNMENT*/ \"hi\";
^" in "hi" as{TypeError} core::int*;
b = 4;
core::int* c = this.{self::A::z};
c = let final Never* #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:19:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
c = /*error:INVALID_ASSIGNMENT*/ \"hi\";
^" in "hi" as{TypeError} core::int*;
c = 4;
}
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 main() → dynamic {}