[cfe] Desugar map spread entries in non-const map literals

Change-Id: Ie8f6cc0294888716f4e0349ba07320e684e26e1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95640
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index 2dda466..5deb216 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -928,10 +928,6 @@
         MapEntry entry = node.entries[i];
         List<DartType> spreadMapEntryElementTypes = new List<DartType>(2);
         if (entry is SpreadMapEntry) {
-          // TODO(dmitrayas):  Remove this flag and all related uses of it when
-          // the desugaring is implemented.
-          bool replaced = false;
-
           DartType spreadMapEntryType = spreadMapEntryTypes[i];
           spreadMapEntryElementTypes[0] = spreadMapEntryElementTypes[1] = null;
           storeSpreadMapEntryElementTypes(
@@ -947,7 +943,6 @@
                             entry.expression.fileOffset,
                             1)),
                     new NullLiteral()));
-            replaced = true;
           } else if (spreadMapEntryType is DynamicType) {
             inferrer.ensureAssignable(
                 inferrer.coreTypes.mapClass.rawType,
@@ -986,17 +981,9 @@
                 valueError ??= new NullLiteral();
                 node.replaceChild(
                     node.entries[i], new MapEntry(keyError, valueError));
-                replaced = true;
               }
             }
           }
-
-          if (!replaced) {
-            node.entries[i] = new MapEntry(
-                new InvalidExpression('unimplemented spread entry')
-                  ..fileOffset = node.fileOffset,
-                new NullLiteral()..parent = node);
-          }
         } else {
           Expression keyJudgment = cachedKeys[i];
           inferrer.ensureAssignable(node.keyType, actualTypes[2 * i],
diff --git a/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart b/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
index 27244cd..3c2bdb6 100644
--- a/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
@@ -4,25 +4,32 @@
 
 library fasta.transform_collections;
 
+import 'dart:core' hide MapEntry;
+
 import 'package:kernel/ast.dart'
     show
         Arguments,
         Block,
         BlockExpression,
+        Class,
         DartType,
         DynamicType,
         Expression,
         ExpressionStatement,
+        Field,
         ForInStatement,
         IfStatement,
         InterfaceType,
         InvalidExpression,
         ListLiteral,
+        MapEntry,
+        MapLiteral,
         MethodInvocation,
         Name,
         Not,
         NullLiteral,
         Procedure,
+        PropertyGet,
         SetLiteral,
         Statement,
         StaticInvocation,
@@ -34,7 +41,7 @@
 
 import 'package:kernel/visitor.dart' show Transformer;
 
-import 'collections.dart' show SpreadElement;
+import 'collections.dart' show SpreadElement, SpreadMapEntry;
 
 import '../source/source_loader.dart' show SourceLoader;
 
@@ -46,6 +53,10 @@
   final Procedure setFactory;
   final Procedure setAdd;
   final Procedure objectEquals;
+  final Procedure mapPut;
+  final Class mapEntryClass;
+  final Field mapEntryKey;
+  final Field mapEntryValue;
 
   static Procedure _findSetFactory(CoreTypes coreTypes) {
     Procedure factory = coreTypes.index.getMember('dart:core', 'Set', '');
@@ -57,9 +68,16 @@
       : coreTypes = loader.coreTypes,
         listAdd = loader.coreTypes.index.getMember('dart:core', 'List', 'add'),
         setFactory = _findSetFactory(loader.coreTypes),
-        setAdd = loader.coreTypes.index.getMember('dart:core', 'Set', 'add'),
         objectEquals =
-            loader.coreTypes.index.getMember('dart:core', 'Object', '==');
+            loader.coreTypes.index.getMember('dart:core', 'Object', '=='),
+        setAdd = loader.coreTypes.index.getMember('dart:core', 'Set', 'add'),
+        mapPut = loader.coreTypes.index.getMember('dart:core', 'Map', '[]='),
+        mapEntryClass =
+            loader.coreTypes.index.getClass('dart:core', 'MapEntry'),
+        mapEntryKey =
+            loader.coreTypes.index.getMember('dart:core', 'MapEntry', 'key'),
+        mapEntryValue =
+            loader.coreTypes.index.getMember('dart:core', 'MapEntry', 'value');
 
   TreeNode _translateListOrSet(
       Expression node, DartType elementType, List<Expression> elements,
@@ -174,4 +192,76 @@
     return _translateListOrSet(node, node.typeArgument, node.expressions,
         isConst: node.isConst, isSet: true);
   }
+
+  @override
+  TreeNode visitMapLiteral(MapLiteral node) {
+    int i = 0;
+    for (; i < node.entries.length; ++i) {
+      if (node.entries[i] is SpreadMapEntry) break;
+      node.entries[i] = node.entries[i].accept(this)..parent = node;
+    }
+
+    if (i == node.entries.length) return node;
+
+    if (node.isConst) {
+      // We don't desugar const maps here.  REmove spread for now so that they
+      // don't leak out.
+      for (; i < node.entries.length; ++i) {
+        MapEntry entry = node.entries[i];
+        if (entry is SpreadMapEntry) {
+          entry.parent.replaceChild(
+              entry,
+              new MapEntry(
+                  InvalidExpression('unimplemented spread element')
+                    ..fileOffset = entry.fileOffset,
+                  new NullLiteral()));
+        }
+      }
+    }
+
+    VariableDeclaration map = new VariableDeclaration.forValue(
+        new MapLiteral([], keyType: node.keyType, valueType: node.valueType),
+        type: new InterfaceType(
+            coreTypes.mapClass, [node.keyType, node.valueType]),
+        isFinal: true);
+    List<Statement> body = [map];
+    for (int j = 0; j < i; ++j) {
+      body.add(new ExpressionStatement(new MethodInvocation(
+          new VariableGet(map),
+          new Name('[]='),
+          new Arguments([node.entries[j].key, node.entries[j].value]),
+          mapPut)));
+    }
+    DartType mapEntryType =
+        new InterfaceType(mapEntryClass, [node.keyType, node.valueType]);
+    for (; i < node.entries.length; ++i) {
+      MapEntry entry = node.entries[i];
+      if (entry is SpreadMapEntry) {
+        VariableDeclaration elt =
+            new VariableDeclaration(null, type: mapEntryType, isFinal: true);
+        body.add(new ForInStatement(
+            elt,
+            entry.expression.accept(this),
+            new ExpressionStatement(new MethodInvocation(
+                new VariableGet(map),
+                new Name('[]='),
+                new Arguments([
+                  new PropertyGet(
+                      new VariableGet(elt), new Name('key'), mapEntryKey),
+                  new PropertyGet(
+                      new VariableGet(elt), new Name('value'), mapEntryValue)
+                ]),
+                mapPut))));
+      } else {
+        entry = entry.accept(this);
+        body.add(new ExpressionStatement(new MethodInvocation(
+            new VariableGet(map),
+            new Name('[]='),
+            new Arguments([entry.key, entry.value]),
+            mapPut)));
+      }
+    }
+
+    return new BlockExpression(new Block(body), new VariableGet(map));
+  }
 }
diff --git a/pkg/front_end/testcases/spread_collection.dart.strong.expect b/pkg/front_end/testcases/spread_collection.dart.strong.expect
index 4b1c6d9..9e18ed0 100644
--- a/pkg/front_end/testcases/spread_collection.dart.strong.expect
+++ b/pkg/front_end/testcases/spread_collection.dart.strong.expect
@@ -14,18 +14,29 @@
       for (final core::int #t4 in #t3)
         #t1.{core::List::add}(#t4);
   } =>#t1;
-  final core::Map<core::int, core::int> aMap = <core::int, core::int>{1: 1, invalid-expression "unimplemented spread entry": null, invalid-expression "unimplemented spread entry": null};
-  final core::Set<core::int> aSet = block {
-    final core::Set<core::int> #t5 = col::LinkedHashSet::•<core::int>();
-    #t5.{core::Set::add}(1);
-    for (final core::int #t6 in <core::int>[2])
-      #t5.{core::Set::add}(#t6);
-    final dynamic #t7 = <core::int>[3];
-    if(!#t7.{core::Object::==}(null))
-      for (final core::int #t8 in #t7)
-        #t5.{core::Set::add}(#t8);
+  final core::Map<core::int, core::int> aMap = block {
+    final core::Map<core::int, core::int> #t5 = <core::int, core::int>{};
+    #t5.{core::Map::[]=}(1, 1);
+    for (final core::MapEntry<core::int, core::int> #t6 in <dynamic, dynamic>{2: 2})
+      #t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
+    for (final core::MapEntry<core::int, core::int> #t7 in <dynamic, dynamic>{3: 3})
+      #t5.{core::Map::[]=}(#t7.{core::MapEntry::key}, #t7.{core::MapEntry::value});
   } =>#t5;
-  final core::Map<dynamic, dynamic> aSetOrMap = <dynamic, dynamic>{invalid-expression "unimplemented spread entry": null};
+  final core::Set<core::int> aSet = block {
+    final core::Set<core::int> #t8 = col::LinkedHashSet::•<core::int>();
+    #t8.{core::Set::add}(1);
+    for (final core::int #t9 in <core::int>[2])
+      #t8.{core::Set::add}(#t9);
+    final dynamic #t10 = <core::int>[3];
+    if(!#t10.{core::Object::==}(null))
+      for (final core::int #t11 in #t10)
+        #t8.{core::Set::add}(#t11);
+  } =>#t8;
+  final core::Map<dynamic, dynamic> aSetOrMap = block {
+    final core::Map<dynamic, dynamic> #t12 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t13 in self::foo() as{TypeError} core::Map<dynamic, dynamic>)
+      #t12.{core::Map::[]=}(#t13.{core::MapEntry::key}, #t13.{core::MapEntry::value});
+  } =>#t12;
   core::print(aList);
   core::print(aSet);
   core::print(aMap);
diff --git a/pkg/front_end/testcases/spread_collection.dart.strong.transformed.expect b/pkg/front_end/testcases/spread_collection.dart.strong.transformed.expect
index 4b1c6d9..9e18ed0 100644
--- a/pkg/front_end/testcases/spread_collection.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/spread_collection.dart.strong.transformed.expect
@@ -14,18 +14,29 @@
       for (final core::int #t4 in #t3)
         #t1.{core::List::add}(#t4);
   } =>#t1;
-  final core::Map<core::int, core::int> aMap = <core::int, core::int>{1: 1, invalid-expression "unimplemented spread entry": null, invalid-expression "unimplemented spread entry": null};
-  final core::Set<core::int> aSet = block {
-    final core::Set<core::int> #t5 = col::LinkedHashSet::•<core::int>();
-    #t5.{core::Set::add}(1);
-    for (final core::int #t6 in <core::int>[2])
-      #t5.{core::Set::add}(#t6);
-    final dynamic #t7 = <core::int>[3];
-    if(!#t7.{core::Object::==}(null))
-      for (final core::int #t8 in #t7)
-        #t5.{core::Set::add}(#t8);
+  final core::Map<core::int, core::int> aMap = block {
+    final core::Map<core::int, core::int> #t5 = <core::int, core::int>{};
+    #t5.{core::Map::[]=}(1, 1);
+    for (final core::MapEntry<core::int, core::int> #t6 in <dynamic, dynamic>{2: 2})
+      #t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
+    for (final core::MapEntry<core::int, core::int> #t7 in <dynamic, dynamic>{3: 3})
+      #t5.{core::Map::[]=}(#t7.{core::MapEntry::key}, #t7.{core::MapEntry::value});
   } =>#t5;
-  final core::Map<dynamic, dynamic> aSetOrMap = <dynamic, dynamic>{invalid-expression "unimplemented spread entry": null};
+  final core::Set<core::int> aSet = block {
+    final core::Set<core::int> #t8 = col::LinkedHashSet::•<core::int>();
+    #t8.{core::Set::add}(1);
+    for (final core::int #t9 in <core::int>[2])
+      #t8.{core::Set::add}(#t9);
+    final dynamic #t10 = <core::int>[3];
+    if(!#t10.{core::Object::==}(null))
+      for (final core::int #t11 in #t10)
+        #t8.{core::Set::add}(#t11);
+  } =>#t8;
+  final core::Map<dynamic, dynamic> aSetOrMap = block {
+    final core::Map<dynamic, dynamic> #t12 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t13 in self::foo() as{TypeError} core::Map<dynamic, dynamic>)
+      #t12.{core::Map::[]=}(#t13.{core::MapEntry::key}, #t13.{core::MapEntry::value});
+  } =>#t12;
   core::print(aList);
   core::print(aSet);
   core::print(aMap);
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart.strong.expect b/pkg/front_end/testcases/spread_collection_inference.dart.strong.expect
index b55f343..a8ade16 100644
--- a/pkg/front_end/testcases/spread_collection_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/spread_collection_inference.dart.strong.expect
@@ -79,103 +79,130 @@
     for (final dynamic #t4 in <dynamic>[])
       #t3.{core::Set::add}(#t4);
   } =>#t3;
-  core::Map<dynamic, dynamic> map10 = <dynamic, dynamic>{invalid-expression "unimplemented spread entry": null};
-  core::List<core::int> lhs20 = block {
-    final core::List<core::int> #t5 = <core::int>[];
-    for (final core::int #t6 in spread)
-      #t5.{core::List::add}(#t6);
+  core::Map<dynamic, dynamic> map10 = block {
+    final core::Map<dynamic, dynamic> #t5 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t6 in <dynamic, dynamic>{})
+      #t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
   } =>#t5;
-  core::Set<core::int> set20 = block {
-    final core::Set<core::int> #t7 = col::LinkedHashSet::•<core::int>();
+  core::List<core::int> lhs20 = block {
+    final core::List<core::int> #t7 = <core::int>[];
     for (final core::int #t8 in spread)
-      #t7.{core::Set::add}(#t8);
-    #t7.{core::Set::add}(42);
+      #t7.{core::List::add}(#t8);
   } =>#t7;
-  core::Map<core::String, core::int> map20 = <core::String, core::int>{invalid-expression "unimplemented spread entry": null, "baz": 42};
-  core::List<dynamic> lhs21 = block {
-    final core::List<dynamic> #t9 = <dynamic>[];
-    for (final dynamic #t10 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
-      #t9.{core::List::add}(#t10);
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t9 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t10 in spread)
+      #t9.{core::Set::add}(#t10);
+    #t9.{core::Set::add}(42);
   } =>#t9;
-  core::Set<dynamic> set21 = block {
-    final core::Set<dynamic> #t11 = col::LinkedHashSet::•<dynamic>();
-    for (final dynamic #t12 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
-      #t11.{core::Set::add}(#t12);
-    #t11.{core::Set::add}(42);
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t11 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t12 in mapSpread)
+      #t11.{core::Map::[]=}(#t12.{core::MapEntry::key}, #t12.{core::MapEntry::value});
+    #t11.{core::Map::[]=}("baz", 42);
   } =>#t11;
-  core::Map<dynamic, dynamic> map21 = <dynamic, dynamic>{invalid-expression "unimplemented spread entry": null, "baz": 42};
-  core::List<core::int> lhs22 = block {
-    final core::List<core::int> #t13 = <core::int>[];
-    for (final core::int #t14 in <core::int>[])
+  core::List<dynamic> lhs21 = block {
+    final core::List<dynamic> #t13 = <dynamic>[];
+    for (final dynamic #t14 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
       #t13.{core::List::add}(#t14);
   } =>#t13;
-  core::Set<core::int> set22 = block {
-    final core::Set<core::int> #t15 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t16 in <core::int>[])
+  core::Set<dynamic> set21 = block {
+    final core::Set<dynamic> #t15 = col::LinkedHashSet::•<dynamic>();
+    for (final dynamic #t16 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
       #t15.{core::Set::add}(#t16);
     #t15.{core::Set::add}(42);
   } =>#t15;
-  core::Map<core::String, core::int> map22 = <core::String, core::int>{invalid-expression "unimplemented spread entry": null};
-  core::List<core::List<core::int>> lhs23 = block {
-    final core::List<core::List<core::int>> #t17 = <core::List<core::int>>[];
-    for (final core::List<core::int> #t18 in <core::List<core::int>>[<core::int>[]])
-      #t17.{core::List::add}(#t18);
+  core::Map<dynamic, dynamic> map21 = block {
+    final core::Map<dynamic, dynamic> #t17 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t18 in (spread as dynamic) as{TypeError} core::Map<dynamic, dynamic>)
+      #t17.{core::Map::[]=}(#t18.{core::MapEntry::key}, #t18.{core::MapEntry::value});
+    #t17.{core::Map::[]=}("baz", 42);
   } =>#t17;
-  core::Set<core::List<core::int>> set23 = block {
-    final core::Set<core::List<core::int>> #t19 = col::LinkedHashSet::•<core::List<core::int>>();
-    for (final core::List<core::int> #t20 in <core::List<core::int>>[<core::int>[]])
-      #t19.{core::Set::add}(#t20);
-    #t19.{core::Set::add}(<core::int>[42]);
+  core::List<core::int> lhs22 = block {
+    final core::List<core::int> #t19 = <core::int>[];
+    for (final core::int #t20 in <core::int>[])
+      #t19.{core::List::add}(#t20);
   } =>#t19;
-  core::Map<core::String, core::List<core::int>> map23 = <core::String, core::List<core::int>>{invalid-expression "unimplemented spread entry": null};
-  core::int lhs30 = let final<BottomType> #t21 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:56:62: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
+  core::Set<core::int> set22 = block {
+    final core::Set<core::int> #t21 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t22 in <core::int>[])
+      #t21.{core::Set::add}(#t22);
+    #t21.{core::Set::add}(42);
+  } =>#t21;
+  core::Map<core::String, core::int> map22 = block {
+    final core::Map<core::String, core::int> #t23 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t24 in <core::String, core::int>{})
+      #t23.{core::Map::[]=}(#t24.{core::MapEntry::key}, #t24.{core::MapEntry::value});
+  } =>#t23;
+  core::List<core::List<core::int>> lhs23 = block {
+    final core::List<core::List<core::int>> #t25 = <core::List<core::int>>[];
+    for (final core::List<core::int> #t26 in <core::List<core::int>>[<core::int>[]])
+      #t25.{core::List::add}(#t26);
+  } =>#t25;
+  core::Set<core::List<core::int>> set23 = block {
+    final core::Set<core::List<core::int>> #t27 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (final core::List<core::int> #t28 in <core::List<core::int>>[<core::int>[]])
+      #t27.{core::Set::add}(#t28);
+    #t27.{core::Set::add}(<core::int>[42]);
+  } =>#t27;
+  core::Map<core::String, core::List<core::int>> map23 = block {
+    final core::Map<core::String, core::List<core::int>> #t29 = <core::String, core::List<core::int>>{};
+    for (final core::MapEntry<core::String, core::List<core::int>> #t30 in <core::String, core::List<core::int>>{"baz": <core::int>[]})
+      #t29.{core::Map::[]=}(#t30.{core::MapEntry::key}, #t30.{core::MapEntry::value});
+  } =>#t29;
+  core::int lhs30 = let final<BottomType> #t31 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:56:62: 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'.
   int lhs30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ [...spread];
                                                              ^" in ( block {
-    final core::List<core::int> #t22 = <core::int>[];
-    for (final core::int #t23 in spread)
-      #t22.{core::List::add}(#t23);
-  } =>#t22) as{TypeError} core::int;
-  core::int set30 = let final<BottomType> #t24 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:58:62: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+    final core::List<core::int> #t32 = <core::int>[];
+    for (final core::int #t33 in spread)
+      #t32.{core::List::add}(#t33);
+  } =>#t32) as{TypeError} core::int;
+  core::int set30 = let final<BottomType> #t34 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:58:62: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
  - 'Set' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   int set30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ {...spread, 42};
                                                              ^" in ( block {
-    final core::Set<core::int> #t25 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t26 in spread)
-      #t25.{core::Set::add}(#t26);
-    #t25.{core::Set::add}(42);
-  } =>#t25) as{TypeError} core::int;
-  core::int map30 = let final<BottomType> #t27 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:61:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+    final core::Set<core::int> #t35 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t36 in spread)
+      #t35.{core::Set::add}(#t36);
+    #t35.{core::Set::add}(42);
+  } =>#t35) as{TypeError} core::int;
+  core::int map30 = let final<BottomType> #t37 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:61:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
  - 'Map' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
     {...mapSpread, \"baz\": 42};
-    ^" in <core::String, core::int>{invalid-expression "unimplemented spread entry": null, "baz": 42} as{TypeError} core::int;
+    ^" in ( block {
+    final core::Map<core::String, core::int> #t38 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t39 in mapSpread)
+      #t38.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+    #t38.{core::Map::[]=}("baz", 42);
+  } =>#t38) as{TypeError} core::int;
   core::List<dynamic> lhs40 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:64:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadInt];
     ^"];
-  core::Set<dynamic> set40 = let final core::Set<dynamic> #t28 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t29 = #t28.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:67:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+  core::Set<dynamic> set40 = let final core::Set<dynamic> #t40 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t41 = #t40.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:67:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadInt};
-    ^") in #t28;
+    ^") in #t40;
   core::Map<dynamic, dynamic> map40 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:70:43: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
     /*@error=SpreadMapEntryTypeMismatch*/ notSpreadInt};
                                           ^": null};
   core::List<dynamic> lhs50 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:73:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadFunction];
     ^"];
-  core::Set<dynamic> set50 = let final core::Set<dynamic> #t30 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t31 = #t30.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:76:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+  core::Set<dynamic> set50 = let final core::Set<dynamic> #t42 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t43 = #t42.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:76:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadFunction};
-    ^") in #t30;
+    ^") in #t42;
   core::Map<dynamic, dynamic> map50 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:79:43: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
     /*@error=SpreadMapEntryTypeMismatch*/ notSpreadFunction};
                                           ^": null};
   core::List<core::String> lhs60 = <core::String>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:82:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
     spread];
     ^"];
-  core::Set<core::String> set60 = let final core::Set<core::String> #t32 = col::LinkedHashSet::•<core::String>() in let final dynamic #t33 = #t32.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:84:73: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+  core::Set<core::String> set60 = let final core::Set<core::String> #t44 = col::LinkedHashSet::•<core::String>() in let final dynamic #t45 = #t44.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:84:73: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
   Set<String> set60 = <String>{... /*@error=SpreadElementTypeMismatch*/ spread};
-                                                                        ^") in #t32;
+                                                                        ^") in #t44;
   core::Map<core::int, core::int> map60 = <core::int, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:87:53: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
     /*@error=SpreadMapEntryElementKeyTypeMismatch*/ mapSpread};
                                                     ^": null};
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/spread_collection_inference.dart.strong.transformed.expect
index c2fae74..34ef7b6 100644
--- a/pkg/front_end/testcases/spread_collection_inference.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/spread_collection_inference.dart.strong.transformed.expect
@@ -79,103 +79,130 @@
     for (final dynamic #t4 in <dynamic>[])
       #t3.{core::Set::add}(#t4);
   } =>#t3;
-  core::Map<dynamic, dynamic> map10 = <dynamic, dynamic>{invalid-expression "unimplemented spread entry": null};
-  core::List<core::int> lhs20 = block {
-    final core::List<core::int> #t5 = <core::int>[];
-    for (final core::int #t6 in spread)
-      #t5.{core::List::add}(#t6);
+  core::Map<dynamic, dynamic> map10 = block {
+    final core::Map<dynamic, dynamic> #t5 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t6 in <dynamic, dynamic>{})
+      #t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
   } =>#t5;
-  core::Set<core::int> set20 = block {
-    final core::Set<core::int> #t7 = col::LinkedHashSet::•<core::int>();
+  core::List<core::int> lhs20 = block {
+    final core::List<core::int> #t7 = <core::int>[];
     for (final core::int #t8 in spread)
-      #t7.{core::Set::add}(#t8);
-    #t7.{core::Set::add}(42);
+      #t7.{core::List::add}(#t8);
   } =>#t7;
-  core::Map<core::String, core::int> map20 = <core::String, core::int>{invalid-expression "unimplemented spread entry": null, "baz": 42};
-  core::List<dynamic> lhs21 = block {
-    final core::List<dynamic> #t9 = <dynamic>[];
-    for (final dynamic #t10 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
-      #t9.{core::List::add}(#t10);
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t9 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t10 in spread)
+      #t9.{core::Set::add}(#t10);
+    #t9.{core::Set::add}(42);
   } =>#t9;
-  core::Set<dynamic> set21 = block {
-    final core::Set<dynamic> #t11 = col::LinkedHashSet::•<dynamic>();
-    for (final dynamic #t12 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
-      #t11.{core::Set::add}(#t12);
-    #t11.{core::Set::add}(42);
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t11 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t12 in mapSpread)
+      #t11.{core::Map::[]=}(#t12.{core::MapEntry::key}, #t12.{core::MapEntry::value});
+    #t11.{core::Map::[]=}("baz", 42);
   } =>#t11;
-  core::Map<dynamic, dynamic> map21 = <dynamic, dynamic>{invalid-expression "unimplemented spread entry": null, "baz": 42};
-  core::List<core::int> lhs22 = block {
-    final core::List<core::int> #t13 = <core::int>[];
-    for (final core::int #t14 in <core::int>[])
+  core::List<dynamic> lhs21 = block {
+    final core::List<dynamic> #t13 = <dynamic>[];
+    for (final dynamic #t14 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
       #t13.{core::List::add}(#t14);
   } =>#t13;
-  core::Set<core::int> set22 = block {
-    final core::Set<core::int> #t15 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t16 in <core::int>[])
+  core::Set<dynamic> set21 = block {
+    final core::Set<dynamic> #t15 = col::LinkedHashSet::•<dynamic>();
+    for (final dynamic #t16 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
       #t15.{core::Set::add}(#t16);
     #t15.{core::Set::add}(42);
   } =>#t15;
-  core::Map<core::String, core::int> map22 = <core::String, core::int>{invalid-expression "unimplemented spread entry": null};
-  core::List<core::List<core::int>> lhs23 = block {
-    final core::List<core::List<core::int>> #t17 = <core::List<core::int>>[];
-    for (final core::List<core::int> #t18 in <core::List<core::int>>[<core::int>[]])
-      #t17.{core::List::add}(#t18);
+  core::Map<dynamic, dynamic> map21 = block {
+    final core::Map<dynamic, dynamic> #t17 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t18 in (spread as dynamic) as{TypeError} core::Map<dynamic, dynamic>)
+      #t17.{core::Map::[]=}(#t18.{core::MapEntry::key}, #t18.{core::MapEntry::value});
+    #t17.{core::Map::[]=}("baz", 42);
   } =>#t17;
-  core::Set<core::List<core::int>> set23 = block {
-    final core::Set<core::List<core::int>> #t19 = col::LinkedHashSet::•<core::List<core::int>>();
-    for (final core::List<core::int> #t20 in <core::List<core::int>>[<core::int>[]])
-      #t19.{core::Set::add}(#t20);
-    #t19.{core::Set::add}(<core::int>[42]);
+  core::List<core::int> lhs22 = block {
+    final core::List<core::int> #t19 = <core::int>[];
+    for (final core::int #t20 in <core::int>[])
+      #t19.{core::List::add}(#t20);
   } =>#t19;
-  core::Map<core::String, core::List<core::int>> map23 = <core::String, core::List<core::int>>{invalid-expression "unimplemented spread entry": null};
-  core::int lhs30 = let final<BottomType> #t21 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:56:62: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
+  core::Set<core::int> set22 = block {
+    final core::Set<core::int> #t21 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t22 in <core::int>[])
+      #t21.{core::Set::add}(#t22);
+    #t21.{core::Set::add}(42);
+  } =>#t21;
+  core::Map<core::String, core::int> map22 = block {
+    final core::Map<core::String, core::int> #t23 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t24 in <core::String, core::int>{})
+      #t23.{core::Map::[]=}(#t24.{core::MapEntry::key}, #t24.{core::MapEntry::value});
+  } =>#t23;
+  core::List<core::List<core::int>> lhs23 = block {
+    final core::List<core::List<core::int>> #t25 = <core::List<core::int>>[];
+    for (final core::List<core::int> #t26 in <core::List<core::int>>[<core::int>[]])
+      #t25.{core::List::add}(#t26);
+  } =>#t25;
+  core::Set<core::List<core::int>> set23 = block {
+    final core::Set<core::List<core::int>> #t27 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (final core::List<core::int> #t28 in <core::List<core::int>>[<core::int>[]])
+      #t27.{core::Set::add}(#t28);
+    #t27.{core::Set::add}(<core::int>[42]);
+  } =>#t27;
+  core::Map<core::String, core::List<core::int>> map23 = block {
+    final core::Map<core::String, core::List<core::int>> #t29 = <core::String, core::List<core::int>>{};
+    for (final core::MapEntry<core::String, core::List<core::int>> #t30 in <core::String, core::List<core::int>>{"baz": <core::int>[]})
+      #t29.{core::Map::[]=}(#t30.{core::MapEntry::key}, #t30.{core::MapEntry::value});
+  } =>#t29;
+  core::int lhs30 = let final<BottomType> #t31 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:56:62: 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'.
   int lhs30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ [...spread];
                                                              ^" in ( block {
-    final core::List<core::int> #t22 = <core::int>[];
-    for (final core::int #t23 in spread)
-      #t22.{core::List::add}(#t23);
-  } =>#t22) as{TypeError} core::int;
-  core::int set30 = let final<BottomType> #t24 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:58:62: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+    final core::List<core::int> #t32 = <core::int>[];
+    for (final core::int #t33 in spread)
+      #t32.{core::List::add}(#t33);
+  } =>#t32) as{TypeError} core::int;
+  core::int set30 = let final<BottomType> #t34 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:58:62: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
  - 'Set' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   int set30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ {...spread, 42};
                                                              ^" in ( block {
-    final core::Set<core::int> #t25 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t26 in spread)
-      #t25.{core::Set::add}(#t26);
-    #t25.{core::Set::add}(42);
-  } =>#t25) as{TypeError} core::int;
-  core::int map30 = let final<BottomType> #t27 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:61:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+    final core::Set<core::int> #t35 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t36 in spread)
+      #t35.{core::Set::add}(#t36);
+    #t35.{core::Set::add}(42);
+  } =>#t35) as{TypeError} core::int;
+  core::int map30 = let final<BottomType> #t37 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:61:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
  - 'Map' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
     {...mapSpread, \"baz\": 42};
-    ^" in <core::String, core::int>{invalid-expression "unimplemented spread entry": null, "baz": 42} as{TypeError} core::int;
+    ^" in ( block {
+    final core::Map<core::String, core::int> #t38 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t39 in mapSpread)
+      #t38.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+    #t38.{core::Map::[]=}("baz", 42);
+  } =>#t38) as{TypeError} core::int;
   core::List<dynamic> lhs40 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:64:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadInt];
     ^"];
-  core::Set<dynamic> set40 = let final core::Set<dynamic> #t28 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t29 = #t28.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:67:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+  core::Set<dynamic> set40 = let final core::Set<dynamic> #t40 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t41 = #t40.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:67:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadInt};
-    ^") in #t28;
+    ^") in #t40;
   core::Map<dynamic, dynamic> map40 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:70:43: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
     /*@error=SpreadMapEntryTypeMismatch*/ notSpreadInt};
                                           ^": null};
   core::List<dynamic> lhs50 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:73:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadFunction];
     ^"];
-  core::Set<dynamic> set50 = let final core::Set<dynamic> #t30 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t31 = #t30.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:76:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+  core::Set<dynamic> set50 = let final core::Set<dynamic> #t42 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t43 = #t42.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:76:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadFunction};
-    ^") in #t30;
+    ^") in #t42;
   core::Map<dynamic, dynamic> map50 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:79:43: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
     /*@error=SpreadMapEntryTypeMismatch*/ notSpreadFunction};
                                           ^": null};
   core::List<core::String> lhs60 = <core::String>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:82:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
     spread];
     ^"];
-  core::Set<core::String> set60 = let final core::Set<core::String> #t32 = col::LinkedHashSet::•<core::String>() in let final core::bool #t33 = #t32.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:84:73: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+  core::Set<core::String> set60 = let final core::Set<core::String> #t44 = col::LinkedHashSet::•<core::String>() in let final core::bool #t45 = #t44.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:84:73: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
   Set<String> set60 = <String>{... /*@error=SpreadElementTypeMismatch*/ spread};
-                                                                        ^") in #t32;
+                                                                        ^") in #t44;
   core::Map<core::int, core::int> map60 = <core::int, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:87:53: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
     /*@error=SpreadMapEntryElementKeyTypeMismatch*/ mapSpread};
                                                     ^": null};
diff --git a/tests/co19_2/co19_2-kernel.status b/tests/co19_2/co19_2-kernel.status
index 3339868..9aa97c8 100644
--- a/tests/co19_2/co19_2-kernel.status
+++ b/tests/co19_2/co19_2-kernel.status
@@ -137,29 +137,27 @@
 Language/Statements/For/syntax_t13: Crash # Assertion error: kernel_shadow_ast.dart: 'receiver == null': is not true.
 Language/Statements/For/syntax_t20: Crash # Assertion error: kernel_shadow_ast.dart: 'receiver == null': is not true.
 LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t03: Crash
-LanguageFeatures/Spread-collections/Ambiguity_A01_t05/01: MissingCompileTimeError
-LanguageFeatures/Spread-collections/Ambiguity_A01_t05/02: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A03_t02/12: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/01: MissingCompileTimeError
+LanguageFeatures/Spread-collections/Ambiguity_A02_t02/none: CompileTimeError
+LanguageFeatures/Spread-collections/Ambiguity_A02_t03: CompileTimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/02: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/03: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/04: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/05: MissingCompileTimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/06: MissingCompileTimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/07: MissingCompileTimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/08: MissingCompileTimeError
 LanguageFeatures/Spread-collections/DynamicSemantics_Map_A01_t01: CompileTimeError
+LanguageFeatures/Spread-collections/DynamicSemantics_Map_A02_t01: CompileTimeError
 LanguageFeatures/Spread-collections/DynamicSemantics_Map_A02_t02: CompileTimeError
 LanguageFeatures/Spread-collections/DynamicSemantics_Map_A02_t03: CompileTimeError
+LanguageFeatures/Spread-collections/DynamicSemantics_Set_A01_t01: CompileTimeError
+LanguageFeatures/Spread-collections/DynamicSemantics_Set_A02_t06: CompileTimeError
 LanguageFeatures/Spread-collections/NullAware_A01_t01: CompileTimeError
 LanguageFeatures/Spread-collections/NullAware_A01_t02: CompileTimeError
 LanguageFeatures/Spread-collections/NullAware_A01_t03: CompileTimeError
 LanguageFeatures/Spread-collections/NullAware_A01_t04: CompileTimeError
+LanguageFeatures/Spread-collections/NullAware_A01_t05: CompileTimeError
+LanguageFeatures/Spread-collections/NullAware_A01_t06: CompileTimeError
 LanguageFeatures/Spread-collections/StaticSemantic_A04_t01/04: MissingCompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A06_t01/01: MissingCompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A06_t01/02: MissingCompileTimeError
 LanguageFeatures/Spread-collections/StaticSemantic_A06_t01/04: MissingCompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A06_t01/05: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A02_t02: CompileTimeError
 
 [ $runtime == vm ]
 LibTest/collection/ListBase/ListBase_class_A01_t02: Pass, Slow # Does many calls
@@ -661,22 +659,14 @@
 LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t10: CompileTimeError
 LanguageFeatures/Spread-collections/Ambiguity_A01_t01: CompileTimeError
 LanguageFeatures/Spread-collections/Ambiguity_A01_t03: CompileTimeError
-LanguageFeatures/Spread-collections/Ambiguity_A01_t05: MissingCompileTimeError
-LanguageFeatures/Spread-collections/Ambiguity_A01_t06: MissingCompileTimeError
 LanguageFeatures/Spread-collections/Ambiguity_A01_t07: CompileTimeError
 LanguageFeatures/Spread-collections/Ambiguity_A02_t01/01: MissingCompileTimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A01_t02: CompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A03_t02/12: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/01: MissingCompileTimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/02: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/03: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/04: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/05: MissingCompileTimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/06: MissingCompileTimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/07: MissingCompileTimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/08: MissingCompileTimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A06_t02: CompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A06_t03: CompileTimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A07_t03: CompileTimeError
 LanguageFeatures/Spread-collections/DynamicSemantics_Set_A02_t01: CompileTimeError
 LanguageFeatures/Spread-collections/DynamicSemantics_Set_A02_t02: CompileTimeError
@@ -689,14 +679,10 @@
 LanguageFeatures/Spread-collections/StaticSemantic_A01_t01: CompileTimeError
 LanguageFeatures/Spread-collections/StaticSemantic_A01_t03: CompileTimeError
 LanguageFeatures/Spread-collections/StaticSemantic_A01_t05: CompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A01_t06: MissingCompileTimeError
 LanguageFeatures/Spread-collections/StaticSemantic_A02_t02: CompileTimeError
 LanguageFeatures/Spread-collections/StaticSemantic_A05_t01/none: CompileTimeError
 LanguageFeatures/Spread-collections/StaticSemantic_A05_t02/none: CompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A06_t01/01: MissingCompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A06_t01/02: MissingCompileTimeError
 LanguageFeatures/Spread-collections/StaticSemantic_A06_t01/04: MissingCompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A06_t01/05: MissingCompileTimeError
 LanguageFeatures/Spread-collections/StaticSemantic_A07_t01/none: CompileTimeError
 LanguageFeatures/Spread-collections/StaticSemantic_A08_t01/none: CompileTimeError
 LanguageFeatures/Spread-collections/Syntax_A01_t03: CompileTimeError
diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status
index bff609c..93f247c 100644
--- a/tests/language_2/language_2_kernel.status
+++ b/tests/language_2/language_2_kernel.status
@@ -259,27 +259,14 @@
 spread_collections/const_error_test/08: MissingCompileTimeError
 spread_collections/const_error_test/10: MissingCompileTimeError
 spread_collections/const_error_test/11: MissingCompileTimeError
-spread_collections/const_error_test/12: MissingCompileTimeError
-spread_collections/const_error_test/13: MissingCompileTimeError
-spread_collections/const_error_test/14: MissingCompileTimeError
 spread_collections/const_error_test/15: MissingCompileTimeError
-spread_collections/const_error_test/16: MissingCompileTimeError
 spread_collections/const_test: CompileTimeError
+spread_collections/inference_test: CompileTimeError
 spread_collections/map_set_ambiguity_error_test/00: MissingCompileTimeError
-spread_collections/map_set_ambiguity_error_test/01: MissingCompileTimeError
-spread_collections/map_set_ambiguity_error_test/02: MissingCompileTimeError
-spread_collections/map_set_ambiguity_error_test/03: MissingCompileTimeError
-spread_collections/map_set_ambiguity_error_test/04: MissingCompileTimeError
 spread_collections/map_set_ambiguity_error_test/05: MissingCompileTimeError
-spread_collections/map_set_ambiguity_error_test/06: MissingCompileTimeError
-spread_collections/map_set_ambiguity_error_test/07: MissingCompileTimeError
 spread_collections/map_set_ambiguity_test: CompileTimeError
 spread_collections/spread_test: CompileTimeError
 spread_collections/syntax_test: CompileTimeError
-spread_collections/type_error_test/01: MissingCompileTimeError
-spread_collections/type_error_test/04: MissingCompileTimeError
-spread_collections/type_error_test/07: MissingCompileTimeError
-spread_collections/type_error_test/08: MissingCompileTimeError
 vm/regress_33469_test/01: MissingCompileTimeError
 vm/regress_33469_test/02: MissingCompileTimeError
 vm/regress_33469_test/03: MissingCompileTimeError