blob: 7a7d29ffac56da55592da12c59bf656eb8cde9d0 [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:32:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// /*@typeArgs=int*/ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ "hello"]);
// ^
//
// pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:34:48: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// /*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ "hello",
// ^
//
// pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:41:48: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// /*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ "hello"
// ^
//
// pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:44:48: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// /*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ "hello",
// ^
//
// pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:51:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// /*@typeArgs=int*/ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ "hello"]);
// ^
//
// pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:53:48: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// /*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ "hello",
// ^
//
// pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:62:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// /*@typeArgs=int*/ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ "hello"]
// ^
//
// pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:65:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// /*@typeArgs=int*/ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ "hello"],
// ^
//
// pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:74:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// /*@typeArgs=int*/ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ "hello"]
// ^
//
// pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:77:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// /*@typeArgs=int*/ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ "hello"],
// ^
//
import self as self;
import "dart:core" as core;
class F0<T extends core::Object = dynamic> extends core::Object {
constructor •(core::List<self::F0::T> a) self::F0<self::F0::T>
: super core::Object::•() {}
}
class F1<T extends core::Object = dynamic> extends core::Object {
constructor •({core::List<self::F1::T> a = null}) self::F1<self::F1::T>
: super core::Object::•() {}
}
class F2<T extends core::Object = dynamic> extends core::Object {
constructor •(core::Iterable<self::F2::T> a) self::F2<self::F2::T>
: super core::Object::•() {}
}
class F3<T extends core::Object = dynamic> extends core::Object {
constructor •(core::Iterable<core::Iterable<self::F3::T>> a) self::F3<self::F3::T>
: super core::Object::•() {}
}
class F4<T extends core::Object = dynamic> extends core::Object {
constructor •({core::Iterable<core::Iterable<self::F4::T>> a = null}) self::F4<self::F4::T>
: super core::Object::•() {}
}
static method test() void {
new self::F0::•<core::int>(<core::int>[]);
new self::F0::•<core::int>(<core::int>[3]);
new self::F0::•<core::int>(<core::int>[let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:32:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
/*@typeArgs=int*/ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\"]);
^" in "hello" as{TypeError} core::int]);
new self::F0::•<core::int>(<core::int>[let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:34:48: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\",
^" in "hello" as{TypeError} core::int, 3]);
new self::F1::•<core::int>(a: <core::int>[]);
new self::F1::•<core::int>(a: <core::int>[3]);
new self::F1::•<core::int>(a: <core::int>[let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:41:48: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\"
^" in "hello" as{TypeError} core::int]);
new self::F1::•<core::int>(a: <core::int>[let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:44:48: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\",
^" in "hello" as{TypeError} core::int, 3]);
new self::F2::•<core::int>(<core::int>[]);
new self::F2::•<core::int>(<core::int>[3]);
new self::F2::•<core::int>(<core::int>[let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:51:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
/*@typeArgs=int*/ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\"]);
^" in "hello" as{TypeError} core::int]);
new self::F2::•<core::int>(<core::int>[let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:53:48: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\",
^" in "hello" as{TypeError} core::int, 3]);
new self::F3::•<core::int>(<core::Iterable<core::int>>[]);
new self::F3::•<core::int>(<core::Iterable<core::int>>[<core::int>[3]]);
new self::F3::•<core::int>(<core::Iterable<core::int>>[<core::int>[let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:62:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
/*@typeArgs=int*/ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\"]
^" in "hello" as{TypeError} core::int]]);
new self::F3::•<core::int>(<core::Iterable<core::int>>[<core::int>[let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:65:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
/*@typeArgs=int*/ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\"],
^" in "hello" as{TypeError} core::int], <core::int>[3]]);
new self::F4::•<core::int>(a: <core::Iterable<core::int>>[]);
new self::F4::•<core::int>(a: <core::Iterable<core::int>>[<core::int>[3]]);
new self::F4::•<core::int>(a: <core::Iterable<core::int>>[<core::int>[let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:74:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
/*@typeArgs=int*/ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\"]
^" in "hello" as{TypeError} core::int]]);
new self::F4::•<core::int>(a: <core::Iterable<core::int>>[<core::int>[let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart:77:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
/*@typeArgs=int*/ [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\"],
^" in "hello" as{TypeError} core::int], <core::int>[3]]);
new self::F3::•<dynamic>(<core::Iterable<dynamic>>[]);
self::F3<core::int> f31 = new self::F3::•<core::int>(<core::List<core::int>>[<core::int>[3]]);
self::F3<core::String> f32 = new self::F3::•<core::String>(<core::List<core::String>>[<core::String>["hello"]]);
self::F3<core::Object> f33 = new self::F3::•<core::Object>(<core::List<core::Object>>[<core::String>["hello"], <core::int>[3]]);
new self::F4::•<dynamic>(a: <core::Iterable<dynamic>>[]);
new self::F4::•<core::int>(a: <core::List<core::int>>[<core::int>[3]]);
new self::F4::•<core::String>(a: <core::List<core::String>>[<core::String>["hello"]]);
new self::F4::•<core::Object>(a: <core::List<core::Object>>[<core::String>["hello"], <core::int>[3]]);
}
static method main() → dynamic {}