c191551fac
TEST=Covered by existing tests. Change-Id: Ied8be1874164e68e0a3a48e1b2f9a33310071381 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183009 Commit-Queue: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
43 lines
2.8 KiB
Plaintext
43 lines
2.8 KiB
Plaintext
library test;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/inference/propagate_inference_transitively.dart:14:56: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
|
|
// a1. /*@target=A.x*/ x = /*error:INVALID_ASSIGNMENT*/ "hi";
|
|
// ^
|
|
//
|
|
// pkg/front_end/testcases/inference/propagate_inference_transitively.dart:17:56: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
|
|
// a2. /*@target=A.x*/ x = /*error:INVALID_ASSIGNMENT*/ "hi";
|
|
// ^
|
|
//
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
class A extends core::Object {
|
|
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
|
|
}
|
|
static method test5() → dynamic {
|
|
self::A* a1 = new self::A::•();
|
|
a1.{self::A::x} = let final Never* #t1 = invalid-expression "pkg/front_end/testcases/inference/propagate_inference_transitively.dart:14:56: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
|
|
a1. /*@target=A.x*/ x = /*error:INVALID_ASSIGNMENT*/ \"hi\";
|
|
^" in "hi" as{TypeError} core::int*;
|
|
self::A* a2 = new self::A::•();
|
|
a2.{self::A::x} = let final Never* #t2 = invalid-expression "pkg/front_end/testcases/inference/propagate_inference_transitively.dart:17:56: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
|
|
a2. /*@target=A.x*/ x = /*error:INVALID_ASSIGNMENT*/ \"hi\";
|
|
^" in "hi" as{TypeError} core::int*;
|
|
}
|
|
static method main() → dynamic {}
|