blob: 741fe3a5f0d906d3acf522c8451ea2c52bf0627a [file] [log] [blame]
library test;
import self as self;
import "dart:core" as core;
static method foo([core::List<core::String> list1 = const <core::String>[], core::List<core::String> list2 = const <core::String>[let final dynamic #t1 = 42 in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:11:89: Error: A value of type 'dart.core::int' can't be assigned to a variable of type 'dart.core::String'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::String'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ 42
^"]]) → void {}
static method main() → void {
{
core::List<core::int> l0 = <core::int>[];
core::List<core::int> l1 = <core::int>[3];
core::List<core::int> l2 = <core::int>[let final dynamic #t2 = "hello" in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:19:50: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\"
^"];
core::List<core::int> l3 = <core::int>[let final dynamic #t3 = "hello" in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:22:50: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\",
^", 3];
}
{
core::List<dynamic> l0 = <dynamic>[];
core::List<dynamic> l1 = <dynamic>[3];
core::List<dynamic> l2 = <dynamic>["hello"];
core::List<dynamic> l3 = <dynamic>["hello", 3];
}
{
core::List<core::int> l0 = let final dynamic #t4 = <core::num>[] in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:33:61: Error: The list literal type 'dart.core::List<dart.core::num>' isn't of expected type 'dart.core::List<dart.core::int>'.
Change the type of the list literal or the context in which it is used.
List<int> l0 = /*error:INVALID_CAST_LITERAL_LIST*/ <num>[];
^";
core::List<core::int> l1 = let final dynamic #t5 = <core::num>[3] in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:34:61: Error: The list literal type 'dart.core::List<dart.core::num>' isn't of expected type 'dart.core::List<dart.core::int>'.
Change the type of the list literal or the context in which it is used.
List<int> l1 = /*error:INVALID_CAST_LITERAL_LIST*/ <num>[3];
^";
core::List<core::int> l2 = let final dynamic #t6 = <core::num>[let final dynamic #t7 = "hello" in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:36:50: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::num'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::num'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\"
^"] in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:35:61: Error: The list literal type 'dart.core::List<dart.core::num>' isn't of expected type 'dart.core::List<dart.core::int>'.
Change the type of the list literal or the context in which it is used.
List<int> l2 = /*error:INVALID_CAST_LITERAL_LIST*/ <num>[
^";
core::List<core::int> l3 = let final dynamic #t8 = <core::num>[let final dynamic #t9 = "hello" in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:39:50: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::num'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::num'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\",
^", 3] in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:38:61: Error: The list literal type 'dart.core::List<dart.core::num>' isn't of expected type 'dart.core::List<dart.core::int>'.
Change the type of the list literal or the context in which it is used.
List<int> l3 = /*error:INVALID_CAST_LITERAL_LIST*/ <num>[
^";
}
{
core::Iterable<core::int> i0 = <core::int>[];
core::Iterable<core::int> i1 = <core::int>[3];
core::Iterable<core::int> i2 = <core::int>[let final dynamic #t10 = "hello" in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:47:50: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\"
^"];
core::Iterable<core::int> i3 = <core::int>[let final dynamic #t11 = "hello" in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:50:50: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\",
^", 3];
}
{
const core::List<core::int> c0 = const <core::int>[];
const core::List<core::int> c1 = const <core::int>[3];
const core::List<core::int> c2 = const <core::int>[let final dynamic #t12 = "hello" in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:58:89: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\"
^"];
const core::List<core::int> c3 = const <core::int>[let final dynamic #t13 = "hello" in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_downwards.dart:61:89: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'.
/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/ \"hello\",
^", 3];
}
}