blob: 8721adb468c6baba9edadfe755aad3ff5e6f9f54 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/spread_collection.dart:6:26: Error: Unexpected token '...'.
// final aList = <int>[1, ...[2], ...?[3]];
// ^^^
//
// pkg/front_end/testcases/spread_collection.dart:6:34: Error: Unexpected token '...?'.
// final aList = <int>[1, ...[2], ...?[3]];
// ^^^^
//
// pkg/front_end/testcases/spread_collection.dart:7:33: Error: Unexpected token '...'.
// final aMap = <int, int>{1: 1, ...{2: 2}, ...?{3: 3}};
// ^^^
//
// pkg/front_end/testcases/spread_collection.dart:7:44: Error: Unexpected token '...?'.
// final aMap = <int, int>{1: 1, ...{2: 2}, ...?{3: 3}};
// ^^^^
//
// pkg/front_end/testcases/spread_collection.dart:8:25: Error: Unexpected token '...'.
// final aSet = <int>{1, ...[2], ...?[3]};
// ^^^
//
// pkg/front_end/testcases/spread_collection.dart:8:33: Error: Unexpected token '...?'.
// final aSet = <int>{1, ...[2], ...?[3]};
// ^^^^
//
// pkg/front_end/testcases/spread_collection.dart:9:22: Error: Unexpected token '...'.
// final aSetOrMap = {...foo()};
// ^^^
//
// pkg/front_end/testcases/spread_collection.dart:6:29: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
// - 'List' is from 'dart:core'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// final aList = <int>[1, ...[2], ...?[3]];
// ^
//
// pkg/front_end/testcases/spread_collection.dart:6:38: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
// - 'List' is from 'dart:core'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// final aList = <int>[1, ...[2], ...?[3]];
// ^
//
// pkg/front_end/testcases/spread_collection.dart:8:28: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
// - 'List' is from 'dart:core'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// final aSet = <int>{1, ...[2], ...?[3]};
// ^
//
// pkg/front_end/testcases/spread_collection.dart:8:37: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
// - 'List' is from 'dart:core'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// final aSet = <int>{1, ...[2], ...?[3]};
// ^
//
import self as self;
import "dart:core" as core;
import "dart:collection" as col;
static method main() dynamic {
final core::List<core::int> aList = <core::int>[1, let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/spread_collection.dart:6:29: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- 'List' is from 'dart:core'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
final aList = <int>[1, ...[2], ...?[3]];
^" in <core::int>[2] as{TypeError} core::int, let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/spread_collection.dart:6:38: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- 'List' is from 'dart:core'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
final aList = <int>[1, ...[2], ...?[3]];
^" in <core::int>[3] as{TypeError} core::int];
final core::Map<core::int, core::int> aMap = <core::int, core::int>{1: 1};
final core::Set<core::int> aSet = let final core::Set<core::int> #t3 = col::LinkedHashSet::•<core::int>() in let final dynamic #t4 = #t3.{core::Set::add}(1) in let final dynamic #t5 = #t3.{core::Set::add}(let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/spread_collection.dart:8:28: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- 'List' is from 'dart:core'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
final aSet = <int>{1, ...[2], ...?[3]};
^" in <core::int>[2] as{TypeError} core::int) in let final dynamic #t7 = #t3.{core::Set::add}(let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/spread_collection.dart:8:37: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- 'List' is from 'dart:core'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
final aSet = <int>{1, ...[2], ...?[3]};
^" in <core::int>[3] as{TypeError} core::int) in #t3;
final core::Map<dynamic, dynamic> aSetOrMap = <dynamic, dynamic>{};
core::print(aList);
core::print(aSet);
core::print(aMap);
}
static method foo() → dynamic
return null;