| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/unified_collections/const_for.dart:6:50: Error: Not a constant expression. |
| // const List<int> list1 = const [for (var i = 1; i < 4; i++) i]; |
| // ^ |
| // |
| // pkg/front_end/testcases/unified_collections/const_for.dart:6:57: Error: Not a constant expression. |
| // const List<int> list1 = const [for (var i = 1; i < 4; i++) i]; |
| // ^ |
| // |
| // pkg/front_end/testcases/unified_collections/const_for.dart:6:34: Error: 'for' is not supported in constant expressions. |
| // const List<int> list1 = const [for (var i = 1; i < 4; i++) i]; |
| // ^^^ |
| // |
| // pkg/front_end/testcases/unified_collections/const_for.dart:7:34: Error: 'for' is not supported in constant expressions. |
| // const List<int> list2 = const [for (int i in list1) i]; |
| // ^^^ |
| // |
| // pkg/front_end/testcases/unified_collections/const_for.dart:8:48: Error: Not a constant expression. |
| // const Set<int> set1 = const {for (var i = 1; i < 4; i++) i}; |
| // ^ |
| // |
| // pkg/front_end/testcases/unified_collections/const_for.dart:8:55: Error: Not a constant expression. |
| // const Set<int> set1 = const {for (var i = 1; i < 4; i++) i}; |
| // ^ |
| // |
| // pkg/front_end/testcases/unified_collections/const_for.dart:8:32: Error: 'for' is not supported in constant expressions. |
| // const Set<int> set1 = const {for (var i = 1; i < 4; i++) i}; |
| // ^^^ |
| // |
| // pkg/front_end/testcases/unified_collections/const_for.dart:9:32: Error: 'for' is not supported in constant expressions. |
| // const Set<int> set2 = const {for (int i in set1) i}; |
| // ^^^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| static method test() → dynamic { |
| const core::List<core::int> list1 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:6:34: Error: 'for' is not supported in constant expressions. |
| const List<int> list1 = const [for (var i = 1; i < 4; i++) i]; |
| ^^^"; |
| const core::List<core::int> list2 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:7:34: Error: 'for' is not supported in constant expressions. |
| const List<int> list2 = const [for (int i in list1) i]; |
| ^^^"; |
| const core::Set<core::int> set1 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:8:32: Error: 'for' is not supported in constant expressions. |
| const Set<int> set1 = const {for (var i = 1; i < 4; i++) i}; |
| ^^^"; |
| const core::Set<core::int> set2 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:9:32: Error: 'for' is not supported in constant expressions. |
| const Set<int> set2 = const {for (int i in set1) i}; |
| ^^^"; |
| } |