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>
20 lines
977 B
Plaintext
20 lines
977 B
Plaintext
library test;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/inference/downwards_inference_assignment_statements.dart:10:72: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
|
|
// l = /*@ typeArgs=int* */ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ "hello"];
|
|
// ^
|
|
//
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
static method test() → void {
|
|
core::List<core::int*>* l;
|
|
l = <core::int*>[let final Never* #t1 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_assignment_statements.dart:10:72: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
|
|
l = /*@ typeArgs=int* */ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\"];
|
|
^" in "hello" as{TypeError} core::int*];
|
|
l = l = <core::int*>[1];
|
|
}
|
|
static method main() → dynamic {}
|