Merge remote-tracking branch 'origin/master'
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A09_t01.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A09_t01.dart
new file mode 100644
index 0000000..ded21ef
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A09_t01.dart
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A non-null-aware spread element has static type Null.
+ * @description Checks that compile error is thrown if spread element is
+ * statically [Null].
+ * @description Check that trying to use [null] element as a non-null-aware
+ * spread element causes compile error
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+main() {
+ var res1 = [...null]; //# 01: compile-time error
+ Map res2 = {...null}; //# 02: compile-time error
+ Set res3 = {...null}; //# 03: compile-time error
+
+ var res4 = <int>[...null]; //# 04: compile-time error
+ var res5 = <int>{...null}; //# 05: compile-time error
+ var res6 = <int, int>{...null}; //# 06: compile-time error
+
+ var res7 = [...?null];
+ Map res8 = {...?null};
+ Set res9 = {...?null};
+
+ var res10 = <int>[...?null];
+ var res11 = <int>{...?null};
+ var res12 = <int, int>{...?null};
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A09_t02.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A09_t02.dart
new file mode 100644
index 0000000..32a693b
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A09_t02.dart
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A non-null-aware spread element has static type Null.
+ * @description Checks that compile error is thrown if spread element is
+ * statically [Null].
+ * @description Check that trying to use [null] element as a non-null-aware
+ * spread element in constant causes compile error
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+main() {
+ const res1 = [...null]; //# 01: compile-time error
+ const Map res2 = {...null}; //# 02: compile-time error
+ const Set res3 = {...null}; //# 03: compile-time error
+
+ const res4 = <int>[...null]; //# 04: compile-time error
+ const res5 = <int>{...null}; //# 05: compile-time error
+ const res6 = <int, int>{...null}; //# 06: compile-time error
+
+ const res7 = [...?null];
+ const Map res8 = {...?null};
+ const Set res9 = {...?null};
+
+ const res10 = <int>[...?null];
+ const res11 = <int>{...?null};
+ const res12 = <int, int>{...?null};
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A09_t03.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A09_t03.dart
new file mode 100644
index 0000000..7cb6fba
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A09_t03.dart
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A non-null-aware spread element has static type Null.
+ * @description Checks that compile error is thrown if spread element is
+ * statically [Null].
+ * @description Check that trying to use [null] element as a non-null-aware
+ * spread element causes compile error
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+Null n = null;
+
+main() {
+ var res1 = [...n]; //# 01: compile-time error
+ Map res2 = {...n}; //# 02: compile-time error
+ Set res3 = {...n}; //# 03: compile-time error
+
+ var res4 = <int>[...n]; //# 04: compile-time error
+ var res5 = <int>{...n}; //# 05: compile-time error
+ var res6 = <int, int>{...n}; //# 06: compile-time error
+
+ var res7 = [...?n];
+ Map res8 = {...?n};
+ Set res9 = {...?n};
+
+ var res10 = <int>[...?n];
+ var res11 = <int>{...?n};
+ var res12 = <int, int>{...?n};
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A09_t04.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A09_t04.dart
new file mode 100644
index 0000000..a0d3fb3
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A09_t04.dart
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A non-null-aware spread element has static type Null.
+ * @description Checks that compile error is thrown if spread element is
+ * statically [Null].
+ * @description Check that trying to use [null] element as a non-null-aware
+ * spread element in constant causes compile error
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+const Null n = null;
+
+main() {
+ const res1 = [...n]; //# 01: compile-time error
+ const Map res2 = {...n}; //# 02: compile-time error
+ const Set res3 = {...n}; //# 03: compile-time error
+
+ const res4 = <int>[...n]; //# 04: compile-time error
+ const res5 = <int>{...n}; //# 05: compile-time error
+ const res6 = <int, int>{...n}; //# 06: compile-time error
+
+ const res7 = [...?n];
+ const Map res8 = {...?n};
+ const Set res9 = {...?n};
+
+ const res10 = <int>[...?n];
+ const res11 = <int>{...?n};
+ const res12 = <int, int>{...?n};
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A10_t01.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t01.dart
new file mode 100644
index 0000000..892a65e
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t01.dart
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A spread element in a list or set literal has a static type that is not
+ * dynamic and not a subtype of Iterable<Object>.
+ * @description Checks that compile error is thrown if spread element in the
+ * list is not dynamic and is not assignable to [Iterable]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+import "dart:async";
+
+main() {
+ dynamic x1;
+ Object x2;
+ List x3;
+ Set x4;
+ Map x5;
+ int x6;
+ Iterable x7;
+ Null x8;
+ void x9;
+ Future x10;
+ FutureOr x11;
+
+ List l1 = [...x1];
+ List l2 = [...x2]; //# 01: compile-time error
+ List l3 = [...x3];
+ List l4 = [...x4];
+ List l5 = [...x5]; //# 02: compile-time error
+ List l6 = [...x6]; //# 03: compile-time error
+ List l7 = [...x7];
+ List l8 = [...x8]; //# 04: compile-time error
+ List l9 = [...x9]; //# 05: compile-time error
+ List l10 = [...x10]; //# 06: compile-time error
+ List l11 = [...x11]; //# 07: compile-time error
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A10_t02.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t02.dart
new file mode 100644
index 0000000..ee36659
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t02.dart
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A spread element in a list or set literal has a static type that is not
+ * dynamic and not a subtype of Iterable<Object>.
+ * @description Checks that compile error is thrown if null-aware spread element
+ * in the list is not dynamic and is not assignable to [Iterable] or [Null]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+import "dart:async";
+
+main() {
+ dynamic x1;
+ Object x2;
+ List x3;
+ Set x4;
+ Map x5;
+ int x6;
+ Iterable x7;
+ Null x8;
+ void x9;
+ Future x10;
+ FutureOr x11;
+
+ List l1 = [...?x1];
+ List l2 = [...?x2]; //# 01: compile-time error
+ List l3 = [...?x3];
+ List l4 = [...?x4];
+ List l5 = [...?x5]; //# 02: compile-time error
+ List l6 = [...?x6]; //# 03: compile-time error
+ List l7 = [...?x7];
+ List l8 = [...?x8];
+ List l9 = [...?x9]; //# 04: compile-time error
+ List l10 = [...?x10]; //# 05: compile-time error
+ List l11 = [...?x11]; //# 06: compile-time error
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A10_t03.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t03.dart
new file mode 100644
index 0000000..1ce3332
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t03.dart
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A spread element in a list or set literal has a static type that is not
+ * dynamic and not a subtype of Iterable<Object>.
+ * @description Checks that compile error is thrown if spread element in the
+ * constant list is not assignable to [Iterable]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+main() {
+ const x1 = [];
+ const Set x2 = {1};
+ const Map x3 = {1: 1};
+ const x4 = 100;
+ const x5 = "check";
+ const x6 = null;
+
+ const List l1 = [...x1];
+ const List l2 = [...x2];
+ const List l3 = [...x3]; //# 01: compile-time error
+ const List l4 = [...x4]; //# 02: compile-time error
+ const List l5 = [...x5]; //# 03: compile-time error
+ const List l6 = [...x6]; //# 04: compile-time error
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A10_t04.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t04.dart
new file mode 100644
index 0000000..1e447bc
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t04.dart
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A spread element in a list or set literal has a static type that is not
+ * dynamic and not a subtype of Iterable<Object>.
+ * @description Checks that compile error is thrown if null-aware spread element
+ * in the constant list is not assignable to [Iterable] and is not [Null]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+main() {
+ const x1 = [];
+ const Set x2 = {1};
+ const Map x3 = {1: 1};
+ const x4 = 100;
+ const x5 = "check";
+ const x6 = null;
+
+ const List l1 = [...?x1];
+ const List l2 = [...?x2];
+ const List l3 = [...?x3]; //# 01: compile-time error
+ const List l4 = [...?x4]; //# 02: compile-time error
+ const List l5 = [...?x5]; //# 03: compile-time error
+ const List l6 = [...?x6];
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A10_t05.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t05.dart
new file mode 100644
index 0000000..3953afd
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t05.dart
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A spread element in a list or set literal has a static type that is not
+ * dynamic and not a subtype of Iterable<Object>.
+ * @description Checks that compile error is thrown if spread element in the
+ * set is not dynamic and is not assignable to [Iterable]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+import "dart:async";
+
+main() {
+ dynamic x1;
+ Object x2;
+ List x3;
+ Set x4;
+ Map x5;
+ int x6;
+ Iterable x7;
+ Null x8;
+ void x9;
+ Future x10;
+ FutureOr x11;
+
+ Set s1 = {...x1};
+ Set s2 = {...x2}; //# 01: compile-time error
+ Set s3 = {...x3};
+ Set s4 = {...x4};
+ Set s5 = {...x5}; //# 02: compile-time error
+ Set s6 = {...x6}; //# 03: compile-time error
+ Set s7 = {...x7};
+ Set s8 = {...x8}; //# 04: compile-time error
+ Set s9 = {...x9}; //# 05: compile-time error
+ Set s10 = {...x10}; //# 06: compile-time error
+ Set s11 = {...x11}; //# 07: compile-time error
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A10_t06.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t06.dart
new file mode 100644
index 0000000..3fdd968
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t06.dart
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A spread element in a list or set literal has a static type that is not
+ * dynamic and not a subtype of Iterable<Object>.
+ * @description Checks that compile error is thrown if null-aware spread element
+ * in the sett is not dynamic and is not assignable to [Iterable] or [Null]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+import "dart:async";
+
+main() {
+ dynamic x1;
+ Object x2;
+ List x3;
+ Set x4;
+ Map x5;
+ int x6;
+ Iterable x7;
+ Null x8;
+ void x9;
+ Future x10;
+ FutureOr x11;
+
+ Set s1 = {...?x1};
+ Set s2 = {...?x2}; //# 01: compile-time error
+ Set s3 = {...?x3};
+ Set s4 = {...?x4};
+ Set s5 = {...?x5}; //# 02: compile-time error
+ Set s6 = {...?x6}; //# 03: compile-time error
+ Set s7 = {...?x7};
+ Set s8 = {...?x8};
+ Set s9 = {...?x9}; //# 04: compile-time error
+ Set s10 = {...?x10}; //# 05: compile-time error
+ Set s11 = {...?x11}; //# 06: compile-time error
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A10_t07.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t07.dart
new file mode 100644
index 0000000..e2f7559
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t07.dart
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A spread element in a list or set literal has a static type that is not
+ * dynamic and not a subtype of Iterable<Object>.
+ * @description Checks that compile error is thrown if spread element in the
+ * constant set is not dynamic and is not assignable to [Iterable]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+main() {
+ const x1 = [];
+ const Set x2 = {1};
+ const Map x3 = {1: 1};
+ const x4 = 100;
+ const x5 = "check";
+ const x6 = null;
+
+ const Set s1 = {...x1};
+ const Set s2 = {...x2};
+ const Set s3 = {...x3}; //# 01: compile-time error
+ const Set s4 = {...x4}; //# 02: compile-time error
+ const Set s5 = {...x5}; //# 03: compile-time error
+ const Set s6 = {...x6}; //# 04: compile-time error
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A10_t08.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t08.dart
new file mode 100644
index 0000000..e784373
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A10_t08.dart
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A spread element in a list or set literal has a static type that is not
+ * dynamic and not a subtype of Iterable<Object>.
+ * @description Checks that compile error is thrown if null-aware spread element
+ * in the constant set is not dynamic and is not assignable to [Iterable] or
+ * [Null]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+main() {
+ const x1 = [];
+ const Set x2 = {1};
+ const Map x3 = {1: 1};
+ const x4 = 100;
+ const x5 = "check";
+ const x6 = null;
+
+ const Set s1 = {...?x1};
+ const Set s2 = {...?x2};
+ const Set s3 = {...?x3}; //# 01: compile-time error
+ const Set s4 = {...?x4}; //# 02: compile-time error
+ const Set s5 = {...?x5}; //# 03: compile-time error
+ const Set s6 = {...?x6};
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A11_t01.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A11_t01.dart
new file mode 100644
index 0000000..644e893
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A11_t01.dart
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A spread element in a map literal has a static type that is not [dynamic] and
+ * not a subtype of [Map<Object, Object>].
+ * @description Checks that compile error is thrown if spread element in the
+ * map is not dynamic and is not assignable to [Map]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+import "dart:async";
+
+main() {
+ dynamic x1;
+ Object x2;
+ List x3;
+ Set x4;
+ Map x5;
+ int x6;
+ Iterable x7;
+ Null x8;
+ void x9;
+ Future x10;
+ FutureOr x11;
+
+ Map m1 = {...x1};
+ Map m2 = {...x2}; //# 01: compile-time error
+ Map m3 = {...x3}; //# 02: compile-time error
+ Map m4 = {...x4}; //# 03: compile-time error
+ Map m5 = {...x5};
+ Map m6 = {...x6}; //# 04: compile-time error
+ Map m7 = {...x7}; //# 05: compile-time error
+ Map m8 = {...x8}; //# 06: compile-time error
+ Map m9 = {...x9}; //# 07: compile-time error
+ Map m10 = {...x10}; //# 08: compile-time error
+ Map m11 = {...x11}; //# 09: compile-time error
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A11_t02.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A11_t02.dart
new file mode 100644
index 0000000..74713bc
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A11_t02.dart
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A spread element in a map literal has a static type that is not [dynamic] and
+ * not a subtype of [Map<Object, Object>].
+ * @description Checks that compile error is thrown if null-aware spread element
+ * in the map is not dynamic, is not assignable to [Map] and is not [null]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+import "dart:async";
+
+main() {
+ dynamic x1;
+ Object x2;
+ List x3;
+ Set x4;
+ Map x5;
+ int x6;
+ Iterable x7;
+ Null x8;
+ void x9;
+ Future x10;
+ FutureOr x11;
+
+ Map m1 = {...?x1};
+ Map m2 = {...?x2}; //# 01: compile-time error
+ Map m3 = {...?x3}; //# 02: compile-time error
+ Map m4 = {...?x4}; //# 03: compile-time error
+ Map m5 = {...?x5};
+ Map m6 = {...?x6}; //# 04: compile-time error
+ Map m7 = {...?x7}; //# 05: compile-time error
+ Map m8 = {...?x8};
+ Map m9 = {...?x9}; //# 06: compile-time error
+ Map m10 = {...?x10}; //# 07: compile-time error
+ Map m11 = {...?x11}; //# 08: compile-time error
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A11_t03.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A11_t03.dart
new file mode 100644
index 0000000..bc336f1
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A11_t03.dart
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A spread element in a map literal has a static type that is not [dynamic] and
+ * not a subtype of [Map<Object, Object>].
+ * @description Checks that compile error is thrown if spread element in the
+ * constant map is not assignable to [Map]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+main() {
+ const x1 = [];
+ const Set x2 = {1};
+ const Map x3 = {1: 1};
+ const x4 = 100;
+ const x5 = "check";
+ const x6 = null;
+
+ const Map m1 = {...x1}; //# 01: compile-time error
+ const Map m2 = {...x2}; //# 02: compile-time error
+ const Map m3 = {...x3};
+ const Map m4 = {...x4}; //# 03: compile-time error
+ const Map m5 = {...x5}; //# 04: compile-time error
+ const Map m6 = {...x6}; //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A11_t04.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A11_t04.dart
new file mode 100644
index 0000000..85cc85b
--- /dev/null
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A11_t04.dart
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion It is a compile-time error if:
+ * A spread element in a map literal has a static type that is not [dynamic] and
+ * not a subtype of [Map<Object, Object>].
+ * @description Checks that compile error is thrown if null-aware spread element
+ * in the constant map is not assignable to [Map] and is not [Null]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+main() {
+ const x1 = [];
+ const Set x2 = {1};
+ const Map x3 = {1: 1};
+ const x4 = 100;
+ const x5 = "check";
+ const x6 = null;
+
+ const Map m1 = {...?x1}; //# 01: compile-time error
+ const Map m2 = {...?x2}; //# 02: compile-time error
+ const Map m3 = {...?x3};
+ const Map m4 = {...?x4}; //# 03: compile-time error
+ const Map m5 = {...?x5}; //# 04: compile-time error
+ const Map m6 = {...?x6};
+}