Version 2.12.0-29.0.dev

Merge commit 'f8e03b3cfd1179e39a612650d50fe0c87e6f8f0f' into 'dev'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e478d0b..c1ed2a0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -56,8 +56,10 @@
 
 #### Linter
 
-Updated the Linter to `0.1.123`, which includes:
+Updated the Linter to `0.1.124`, which includes:
 
+* Fixed false positives in `prefer_constructors_over_static_methods`.
+* Updates to `package_names` to allow leading underscores.
 * Fixed NPEs in `unnecessary_null_checks`.
 * A fixed NPE in `missing_whitespace_between_adjacent_strings`.
 * Updates to `void_checks` for NNBD.
diff --git a/DEPS b/DEPS
index 1e6598a..51d9353 100644
--- a/DEPS
+++ b/DEPS
@@ -81,7 +81,7 @@
   "cli_util_rev" : "335ed165887d0ec97c2a09173ebf22dcf56a6c4e",
   "clock_rev" : "a494269254ba978e7ef8f192c5f7fec3fc05b9d3",
   "collection_rev": "e4bb038ce2d8e66fb15818aa40685c68d53692ab",
-  "convert_rev": "c1b01f832835d3d8a06b0b246a361c0eaab35d3c",
+  "convert_rev": "dd3bd28f63be7cb8ab961f38bc73229e4473b555",
   "crypto_rev": "f7c48b334b1386bc5ab0f706fbcd6df8496a87fc",
   "csslib_rev": "6f77b3dcee957d3e2d5083f666221a220e9ed1f1",
   "dart2js_info_rev" : "0632a623b08e1f601c7eba99e0186a581ae799e9",
@@ -117,7 +117,7 @@
   "intl_tag": "0.17.0-nullsafety",
   "jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
   "json_rpc_2_rev": "8f189db8f0c299187a0e8fa959dba7e9b0254be5",
-  "linter_tag": "0.1.123",
+  "linter_tag": "0.1.124",
   "logging_rev": "9d2a7fdd05b09bc06474881152b5baaf38fd1329",
   "markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
   "markdown_rev": "6f89681d59541ddb1cf3a58efbdaa2304ffc3f51",
@@ -132,7 +132,7 @@
   "ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
   "pool_rev": "eedbd5fde84f9a1a8da643b475305a81841da599",
   "protobuf_rev": "3746c8fd3f2b0147623a8e3db89c3ff4330de760",
-  "pub_rev": "4ca4767a6c00b2dadecdaee9a4866dae40ef25f2",
+  "pub_rev": "b10966c6a8ad7d95c2023b7842fa2697001d2fdf",
   "pub_semver_tag": "v1.4.4",
   "resource_rev": "6b79867d0becf5395e5819a75720963b8298e9a7",
   "root_certificates_rev": "7e5ec82c99677a2e5b95ce296c4d68b0d3378ed8",
@@ -147,7 +147,7 @@
   "source_maps_rev": "53eb92ccfe6e64924054f83038a534b959b12b3e",
   "source_span_rev": "49ff31eabebed0da0ae6634124f8ba5c6fbf57f1",
   "sse_tag": "e5cf68975e8e87171a3dc297577aa073454a91dc",
-  "stack_trace_tag": "c9c867fa9d5b9c8a059e33d3efe759698aa49d60",
+  "stack_trace_tag": "6788afc61875079b71b3d1c3e65aeaa6a25cbc2f",
   "stagehand_tag": "v3.3.9",
   "stream_channel_tag": "d7251e61253ec389ee6e045ee1042311bced8f1d",
   "string_scanner_rev": "1b63e6e5db5933d7be0a45da6e1129fe00262734",
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 18b8438..8e7af39 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -25,8 +25,6 @@
 import 'package:analysis_server/src/server/sdk_configuration.dart';
 import 'package:analysis_server/src/server/stdio_server.dart';
 import 'package:analysis_server/src/services/completion/dart/completion_ranking.dart';
-import 'package:analysis_server/src/services/completion/dart/uri_contributor.dart'
-    show UriContributor;
 import 'package:analysis_server/src/socket_server.dart';
 import 'package:analysis_server/src/utilities/request_statistics.dart';
 import 'package:analysis_server/starter.dart';
@@ -219,9 +217,6 @@
   /// The name of the option used to set the version for the client.
   static const String CLIENT_VERSION = 'client-version';
 
-  /// The name of the option used to enable DartPad specific functionality.
-  static const String DARTPAD_OPTION = 'dartpad';
-
   /// The name of the option used to disable exception handling.
   static const String DISABLE_SERVER_EXCEPTION_HANDLING =
       'disable-server-exception-handling';
@@ -234,9 +229,6 @@
   static const String DISABLE_SERVER_FEATURE_SEARCH =
       'disable-server-feature-search';
 
-  /// The name of the option used to enable instrumentation.
-  static const String ENABLE_INSTRUMENTATION_OPTION = 'enable-instrumentation';
-
   /// The name of the option used to set the file read mode.
   static const String FILE_READ_MODE = 'file-read-mode';
 
@@ -419,10 +411,6 @@
       }
     }
 
-    if (results[DARTPAD_OPTION]) {
-      UriContributor.suggestFilePaths = false;
-    }
-
     {
       bool disableCompletion = results[DISABLE_SERVER_FEATURE_COMPLETION];
       bool disableSearch = results[DISABLE_SERVER_FEATURE_SEARCH];
@@ -747,10 +735,6 @@
         valueHelp: 'name', help: 'an identifier used to identify the client');
     parser.addOption(CLIENT_VERSION,
         valueHelp: 'version', help: 'the version of the client');
-    parser.addFlag(DARTPAD_OPTION,
-        help: 'enable DartPad specific functionality',
-        defaultsTo: false,
-        hide: true);
     parser.addFlag(DISABLE_SERVER_EXCEPTION_HANDLING,
         // TODO(jcollins-g): Pipeline option through and apply to all
         // exception-nullifying runZoned() calls.
@@ -762,10 +746,6 @@
         help: 'disable all completion features', defaultsTo: false, hide: true);
     parser.addFlag(DISABLE_SERVER_FEATURE_SEARCH,
         help: 'disable all search features', defaultsTo: false, hide: true);
-    parser.addFlag(ENABLE_INSTRUMENTATION_OPTION,
-        help: 'enable sending instrumentation information to a server',
-        defaultsTo: false,
-        negatable: false);
     parser.addOption(INSTRUMENTATION_LOG_FILE,
         valueHelp: 'file path',
         help: 'write instrumentation data to the given file');
@@ -831,8 +811,17 @@
     //
     // Deprecated options - no longer read from.
     //
-    parser.addFlag('use-fasta-parser', defaultsTo: true, hide: true);
+
+    // Removed 11/8/2020.
+    parser.addFlag('dartpad', hide: true);
+    // Removed 10/30/2020.
+    parser.addMultiOption('enable-experiment', hide: true);
+    // Removed 9/23/2020.
+    parser.addFlag('enable-instrumentation', hide: true);
+    // Removed 11/8/2020.
     parser.addFlag('preview-dart-2', hide: true);
+    // Removed 9/23/2020.
+    parser.addFlag('use-fasta-parser', hide: true);
 
     return parser;
   }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart
index b832581..6e53137 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart
@@ -14,13 +14,6 @@
 /// A contributor that produces suggestions based on the content of the file
 /// system to complete within URIs in import, export and part directives.
 class UriContributor extends DartCompletionContributor {
-  /// A flag indicating whether file: and package: URI suggestions should
-  /// be included in the list of completion suggestions.
-  // TODO(danrubel): remove this flag and related functionality
-  // once the UriContributor limits file: and package: URI suggestions
-  // to only those paths within context roots.
-  static bool suggestFilePaths = true;
-
   @override
   Future<void> computeSuggestions(
       DartCompletionRequest request, SuggestionBuilder builder) async {
@@ -93,17 +86,13 @@
       var partialUri = _extractPartialUri(node);
       if (partialUri != null) {
         _addDartSuggestions();
-        if (UriContributor.suggestFilePaths) {
-          _addPackageSuggestions(partialUri);
-          _addFileSuggestions(partialUri);
-        }
+        _addPackageSuggestions(partialUri);
+        _addFileSuggestions(partialUri);
       }
     } else if (parent is PartDirective && parent.uri == node) {
       var partialUri = _extractPartialUri(node);
       if (partialUri != null) {
-        if (UriContributor.suggestFilePaths) {
-          _addFileSuggestions(partialUri);
-        }
+        _addFileSuggestions(partialUri);
       }
     }
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/make_variable_nullable.dart b/pkg/analysis_server/lib/src/services/correction/dart/make_variable_nullable.dart
index 5a4d2ec..acd8708 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/make_variable_nullable.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/make_variable_nullable.dart
@@ -28,47 +28,17 @@
   Future<void> compute(ChangeBuilder builder) async {
     var node = coveredNode;
     var parent = node?.parent;
-    if (unit.featureSet.isEnabled(Feature.non_nullable) &&
-        parent is AssignmentExpression &&
-        parent.rightHandSide == node) {
-      var leftHandSide = parent.leftHandSide;
-      if (leftHandSide is SimpleIdentifier) {
-        var element = leftHandSide.staticElement;
-        if (element is LocalVariableElement) {
-          var oldType = element.type;
-          var newType = (node as Expression).staticType;
-          if (node is NullLiteral) {
-            newType = (oldType as InterfaceTypeImpl)
-                .withNullability(NullabilitySuffix.question);
-          } else if (!typeSystem.isAssignableTo(
-              oldType, typeSystem.promoteToNonNull(newType))) {
-            return;
-          }
-          var declarationList =
-              _findDeclaration(element, parent.thisOrAncestorOfType<Block>());
-          if (declarationList == null || declarationList.variables.length > 1) {
-            return;
-          }
-          var variable = declarationList.variables[0];
-          _variableName = variable.name.name;
-          await builder.addDartFileEdit(file, (builder) {
-            var keyword = declarationList.keyword;
-            if (keyword != null && keyword.type == Keyword.VAR) {
-              builder.addReplacement(range.token(keyword), (builder) {
-                builder.writeType(newType);
-              });
-            } else if (keyword == null) {
-              if (declarationList.type == null) {
-                builder.addInsertion(variable.offset, (builder) {
-                  builder.writeType(newType);
-                  builder.write(' ');
-                });
-              } else {
-                builder.addSimpleInsertion(declarationList.type.end, '?');
-              }
-            }
-          });
-        }
+    if (unit.featureSet.isEnabled(Feature.non_nullable)) {
+      if (node is SimpleIdentifier && parent is SimpleFormalParameter) {
+        await _forSimpleFormalParameter(builder, node, parent);
+      } else if (node is SimpleIdentifier &&
+          parent is FunctionTypedFormalParameter) {
+        await _forFunctionTypedFormalParameter(builder, node, parent);
+      } else if (node is SimpleIdentifier && parent is FieldFormalParameter) {
+        await _forFieldFormalParameter(builder, node, parent);
+      } else if (parent is AssignmentExpression &&
+          parent.rightHandSide == node) {
+        await _forVariableDeclaration(builder, node, parent);
       }
     }
   }
@@ -101,6 +71,108 @@
     return null;
   }
 
+  /// Makes [parameter] nullable if possible.
+  Future<void> _forFieldFormalParameter(ChangeBuilder builder,
+      SimpleIdentifier name, FieldFormalParameter parameter) async {
+    if (parameter.parameters != null) {
+      // A function-typed field formal parameter.
+      if (parameter.question != null) {
+        return;
+      }
+      _variableName = parameter.identifier.name;
+      await builder.addDartFileEdit(file, (builder) {
+        // Add '?' after `)`.
+        builder.addSimpleInsertion(parameter.endToken.end, '?');
+      });
+    } else {
+      if (!_typeCanBeMadeNullable(parameter.type)) {
+        return;
+      }
+      _variableName = parameter.identifier.name;
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addSimpleInsertion(parameter.type.end, '?');
+      });
+    }
+  }
+
+  /// Makes [parameter] nullable if possible.
+  Future<void> _forFunctionTypedFormalParameter(ChangeBuilder builder,
+      SimpleIdentifier name, FunctionTypedFormalParameter parameter) async {
+    if (parameter.question != null) {
+      return;
+    }
+    _variableName = parameter.identifier.name;
+    await builder.addDartFileEdit(file, (builder) {
+      // Add '?' after `)`.
+      builder.addSimpleInsertion(parameter.endToken.end, '?');
+    });
+  }
+
+  Future<void> _forSimpleFormalParameter(ChangeBuilder builder,
+      SimpleIdentifier name, SimpleFormalParameter parameter) async {
+    if (!_typeCanBeMadeNullable(parameter.type)) {
+      return;
+    }
+    _variableName = parameter.identifier.name;
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addSimpleInsertion(parameter.type.end, '?');
+    });
+  }
+
+  Future<void> _forVariableDeclaration(
+      ChangeBuilder builder, AstNode node, AssignmentExpression parent) async {
+    var leftHandSide = parent.leftHandSide;
+    if (leftHandSide is SimpleIdentifier) {
+      var element = leftHandSide.staticElement;
+      if (element is LocalVariableElement) {
+        var oldType = element.type;
+        var newType = (node as Expression).staticType;
+        if (node is NullLiteral) {
+          newType = (oldType as InterfaceTypeImpl)
+              .withNullability(NullabilitySuffix.question);
+        } else if (!typeSystem.isAssignableTo(
+            oldType, typeSystem.promoteToNonNull(newType))) {
+          return;
+        }
+        var declarationList =
+            _findDeclaration(element, parent.thisOrAncestorOfType<Block>());
+        if (declarationList == null || declarationList.variables.length > 1) {
+          return;
+        }
+        var variable = declarationList.variables[0];
+        _variableName = variable.name.name;
+        await builder.addDartFileEdit(file, (builder) {
+          var keyword = declarationList.keyword;
+          if (keyword != null && keyword.type == Keyword.VAR) {
+            builder.addReplacement(range.token(keyword), (builder) {
+              builder.writeType(newType);
+            });
+          } else if (keyword == null) {
+            if (declarationList.type == null) {
+              builder.addInsertion(variable.offset, (builder) {
+                builder.writeType(newType);
+                builder.write(' ');
+              });
+            } else {
+              builder.addSimpleInsertion(declarationList.type.end, '?');
+            }
+          }
+        });
+      }
+    }
+  }
+
+  bool _typeCanBeMadeNullable(TypeAnnotation typeAnnotation) {
+    // Ensure that there is a type annotation.
+    if (typeAnnotation == null) {
+      return false;
+    }
+    if (typeSystem.isNullable(typeAnnotation.type)) {
+      return false;
+    }
+    return true;
+  }
+
   /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
   static MakeVariableNullable newInstance() => MakeVariableNullable();
 }
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index ef8c359..30ab805 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -727,6 +727,7 @@
     ],
     CompileTimeErrorCode.MISSING_DEFAULT_VALUE_FOR_PARAMETER: [
       AddRequiredKeyword.newInstance,
+      MakeVariableNullable.newInstance,
     ],
     CompileTimeErrorCode.MISSING_REQUIRED_ARGUMENT: [
       AddMissingRequiredArgument.newInstance,
diff --git a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
index 3d4a399..e19ca34 100644
--- a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
@@ -88,30 +88,6 @@
         csKind: CompletionSuggestionKind.IMPORT);
   }
 
-  Future<void> test_export_package2_off() async {
-    try {
-      UriContributor.suggestFilePaths = false;
-
-      var fooRootPath = '$workspaceRootPath/foo';
-      var barRootPath = '$workspaceRootPath/bar';
-      newFile('$fooRootPath/lib/foo.dart', content: 'library foo;');
-      newFile('$fooRootPath/lib/baz/too.dart', content: 'library too;');
-      newFile('$barRootPath/lib/bar.dart', content: 'library bar;');
-
-      writeTestPackageConfig(
-        config: PackageConfigFileBuilder()
-          ..add(name: 'foo', rootPath: fooRootPath)
-          ..add(name: 'bar', rootPath: barRootPath),
-      );
-
-      addTestSource('export "package:foo/baz/^" import');
-      await computeSuggestions();
-      assertNotSuggested('package:foo/baz/too.dart');
-    } finally {
-      UriContributor.suggestFilePaths = true;
-    }
-  }
-
   Future<void> test_import() async {
     addTestSource('import "^"');
     await computeSuggestions();
@@ -199,30 +175,6 @@
     assertNotSuggested('../blat.dart');
   }
 
-  Future<void> test_import_file2_off() async {
-    try {
-      UriContributor.suggestFilePaths = false;
-
-      testFile = convertPath('$testPackageRootPath/test.dart');
-      newFile('$testPackageRootPath/other.dart');
-      newFile('$testPackageRootPath/foo/bar.dart');
-      newFile('$workspaceRootPath/blat.dart');
-
-      addTestSource('import "..^" import');
-      await computeSuggestions();
-      expect(replacementOffset, completionOffset - 2);
-      expect(replacementLength, 2);
-      assertNotSuggested('completion.dart');
-      assertNotSuggested('other.dart');
-      assertNotSuggested('foo');
-      assertNotSuggested('foo/');
-      assertNotSuggested('foo/bar.dart');
-      assertNotSuggested('../blat.dart');
-    } finally {
-      UriContributor.suggestFilePaths = true;
-    }
-  }
-
   Future<void> test_import_file_child() async {
     testFile = convertPath('$testPackageRootPath/test.dart');
     newFile('$testPackageRootPath/other.dart');
@@ -365,30 +317,6 @@
         csKind: CompletionSuggestionKind.IMPORT);
   }
 
-  Future<void> test_import_package2_off() async {
-    try {
-      UriContributor.suggestFilePaths = false;
-
-      var fooRootPath = '$workspaceRootPath/foo';
-      var barRootPath = '$workspaceRootPath/bar';
-      newFile('$fooRootPath/lib/foo.dart');
-      newFile('$fooRootPath/lib/baz/too.dart');
-      newFile('$barRootPath/lib/bar.dart');
-
-      writeTestPackageConfig(
-        config: PackageConfigFileBuilder()
-          ..add(name: 'foo', rootPath: fooRootPath)
-          ..add(name: 'bar', rootPath: barRootPath),
-      );
-
-      addTestSource('import "package:foo/baz/^" import');
-      await computeSuggestions();
-      assertNotSuggested('package:foo/baz/too.dart');
-    } finally {
-      UriContributor.suggestFilePaths = true;
-    }
-  }
-
   Future<void> test_import_package2_raw() async {
     var fooRootPath = '$workspaceRootPath/foo';
     var barRootPath = '$workspaceRootPath/bar';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/make_variable_nullable_test.dart b/pkg/analysis_server/test/src/services/correction/fix/make_variable_nullable_test.dart
index 3957552..804f106 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/make_variable_nullable_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/make_variable_nullable_test.dart
@@ -21,6 +21,57 @@
   @override
   FixKind get kind => DartFixKind.MAKE_VARIABLE_NULLABLE;
 
+  Future<void> test_fieldFormalParameter() async {
+    await resolveTestCode('''
+class C {
+  String? s;
+  C({String this.s});
+}
+''');
+    // TODO(srawlins): Remove the type if the quick fix as is would use the same
+    // type as the field's type.
+    await assertHasFix('''
+class C {
+  String? s;
+  C({String? this.s});
+}
+''');
+  }
+
+  Future<void> test_fieldFormalParameter_functionTyped() async {
+    await resolveTestCode('''
+class C {
+  String Function()? s;
+  C({String this.s()});
+}
+''');
+    await assertHasFix('''
+class C {
+  String Function()? s;
+  C({String this.s()?});
+}
+''');
+  }
+
+  Future<void> test_fieldFormalParameter_untyped() async {
+    await resolveTestCode('''
+class C {
+  String s;
+  C({this.s});
+}
+''');
+    await assertNoFix();
+  }
+
+  Future<void> test_functionTypedFormalParameter() async {
+    await resolveTestCode('''
+void f({String s()}) {}
+''');
+    await assertHasFix('''
+void f({String s()?}) {}
+''');
+  }
+
   Future<void> test_lhsNotIdentifier() async {
     await resolveTestCode('''
 void f(C c) {
@@ -73,6 +124,42 @@
 ''');
   }
 
+  Future<void> test_simpleFormalParameter() async {
+    await resolveTestCode('''
+void f({String s}) {}
+''');
+    await assertHasFix('''
+void f({String? s}) {}
+''');
+  }
+
+  Future<void> test_simpleFormalParameter_final() async {
+    await resolveTestCode('''
+void f({final String s}) {}
+''');
+    await assertHasFix('''
+void f({final String? s}) {}
+''');
+  }
+
+  Future<void> test_simpleFormalParameter_functionType() async {
+    await resolveTestCode('''
+void f({String Function() s}) {}
+''');
+    await assertHasFix('''
+void f({String Function()? s}) {}
+''');
+  }
+
+  Future<void> test_simpleFormalParameter_typeVariable() async {
+    await resolveTestCode('''
+void f<T>({T s}) {}
+''');
+    await assertHasFix('''
+void f<T>({T? s}) {}
+''');
+  }
+
   Future<void> test_type() async {
     await resolveTestCode('''
 void f() {
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index edbdcfa..74cdd53 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -7498,7 +7498,7 @@
           typeParameters.typeParameters.map<TypeParameterElement>((node) {
         var reference = containerRef.getChild(node.name.name);
         if (reference.hasElementFor(node)) {
-          return reference.element as TypeParameterElement;
+          return reference.element as TypeParameterElement /*!*/;
         }
         return TypeParameterElementImpl.forLinkedNode(this, reference, node);
       }).toList();
diff --git a/pkg/analyzer/lib/src/dart/scanner/scanner.dart b/pkg/analyzer/lib/src/dart/scanner/scanner.dart
index 56ff5ef..48aab67 100644
--- a/pkg/analyzer/lib/src/dart/scanner/scanner.dart
+++ b/pkg/analyzer/lib/src/dart/scanner/scanner.dart
@@ -51,7 +51,7 @@
 
   final List<int> lineStarts = <int>[];
 
-  Token firstToken;
+  /*late final*/ Token firstToken;
 
   /// A flag indicating whether the scanner should recognize the `>>>` operator
   /// and the `>>>=` operator.
diff --git a/pkg/analyzer/test/error/error_test.dart b/pkg/analyzer/test/error/error_test.dart
index da20e5e..2e48e60 100644
--- a/pkg/analyzer/test/error/error_test.dart
+++ b/pkg/analyzer/test/error/error_test.dart
@@ -58,9 +58,9 @@
     List<String> listedCodes = <String>[];
     CompilationUnit listingUnit = parseFile(['lib', 'error', 'error.dart']);
     TopLevelVariableDeclaration declaration = listingUnit.declarations
+        .whereType<TopLevelVariableDeclaration>()
         .firstWhere(
             (member) =>
-                member is TopLevelVariableDeclaration &&
                 member.variables.variables[0].name.name == 'errorCodeValues',
             orElse: () => null);
     ListLiteral listLiteral = declaration.variables.variables[0].initializer;
diff --git a/pkg/analyzer/test/file_system/memory_file_system_test.dart b/pkg/analyzer/test/file_system/memory_file_system_test.dart
index a1fe32f..c5a929b 100644
--- a/pkg/analyzer/test/file_system/memory_file_system_test.dart
+++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart
@@ -104,8 +104,8 @@
 
 @reflectiveTest
 class MemoryFileSourceExistingTest extends BaseTest {
-  String sourcePath;
-  Source source;
+  /*late*/ String sourcePath;
+  /*late*/ Source source;
 
   @override
   setUp() {
@@ -184,8 +184,8 @@
 
 @reflectiveTest
 class MemoryFileSourceNotExistingTest extends BaseTest {
-  String sourcePath;
-  Source source;
+  /*late*/ String sourcePath;
+  /*late*/ Source source;
 
   @override
   setUp() {
@@ -516,7 +516,7 @@
 
   _watchingFolder(
       String path, Function(List<WatchEvent> changesReceived) test) {
-    Folder folder = provider.getResource(path);
+    var folder = provider.getResource(path) as Folder;
     var changesReceived = <WatchEvent>[];
     folder.changes.listen(changesReceived.add);
     return test(changesReceived);
diff --git a/pkg/analyzer/test/file_system/physical_resource_provider_watch_test.dart b/pkg/analyzer/test/file_system/physical_resource_provider_watch_test.dart
index 71ab2b6..c08137e 100644
--- a/pkg/analyzer/test/file_system/physical_resource_provider_watch_test.dart
+++ b/pkg/analyzer/test/file_system/physical_resource_provider_watch_test.dart
@@ -143,7 +143,8 @@
     // start watching are sometimes misclassified as happening just after
     // we start watching.
     return _delayed(() {
-      File file = PhysicalResourceProvider.INSTANCE.getResource(filePath);
+      var file =
+          PhysicalResourceProvider.INSTANCE.getResource(filePath) as File;
       var changesReceived = <WatchEvent>[];
       var subscription = file.changes.listen(changesReceived.add);
       // Delay running the rest of the test to allow file.changes propagate.
@@ -160,7 +161,8 @@
     // start watching are sometimes misclassified as happening just after
     // we start watching.
     return _delayed(() {
-      Folder folder = PhysicalResourceProvider.INSTANCE.getResource(filePath);
+      var folder =
+          PhysicalResourceProvider.INSTANCE.getResource(filePath) as Folder;
       var changesReceived = <WatchEvent>[];
       var subscription = folder.changes.listen(changesReceived.add);
       // Delay running the rest of the test to allow folder.changes to
diff --git a/pkg/analyzer/test/generated/elements_types_mixin.dart b/pkg/analyzer/test/generated/elements_types_mixin.dart
index 3f8afd5..0476d18 100644
--- a/pkg/analyzer/test/generated/elements_types_mixin.dart
+++ b/pkg/analyzer/test/generated/elements_types_mixin.dart
@@ -91,17 +91,17 @@
 
   InterfaceTypeImpl get nullNone {
     var element = typeProvider.nullType.element;
-    return interfaceTypeNone(element);
+    return interfaceTypeNone(element) as InterfaceTypeImpl;
   }
 
   InterfaceTypeImpl get nullQuestion {
     var element = typeProvider.nullType.element;
-    return interfaceTypeQuestion(element);
+    return interfaceTypeQuestion(element) as InterfaceTypeImpl;
   }
 
   InterfaceTypeImpl get nullStar {
     var element = typeProvider.nullType.element;
-    return interfaceTypeStar(element);
+    return interfaceTypeStar(element) as InterfaceTypeImpl;
   }
 
   InterfaceType get numNone {
@@ -222,7 +222,7 @@
   }) {
     return FunctionTypeAliasElementImpl(name, 0)
       ..typeParameters = typeParameters
-      ..function = function;
+      ..function = function as GenericFunctionTypeElementImpl;
   }
 
   FunctionType functionTypeAliasType(
@@ -279,42 +279,42 @@
     return typeProvider.futureElement.instantiate(
       typeArguments: [type],
       nullabilitySuffix: NullabilitySuffix.none,
-    );
+    ) as InterfaceTypeImpl;
   }
 
   InterfaceTypeImpl futureOrNone(DartType type) {
     return typeProvider.futureOrElement.instantiate(
       typeArguments: [type],
       nullabilitySuffix: NullabilitySuffix.none,
-    );
+    ) as InterfaceTypeImpl;
   }
 
   InterfaceTypeImpl futureOrQuestion(DartType type) {
     return typeProvider.futureOrElement.instantiate(
       typeArguments: [type],
       nullabilitySuffix: NullabilitySuffix.question,
-    );
+    ) as InterfaceTypeImpl;
   }
 
   InterfaceTypeImpl futureOrStar(DartType type) {
     return typeProvider.futureOrElement.instantiate(
       typeArguments: [type],
       nullabilitySuffix: NullabilitySuffix.star,
-    );
+    ) as InterfaceTypeImpl;
   }
 
   InterfaceTypeImpl futureQuestion(DartType type) {
     return typeProvider.futureElement.instantiate(
       typeArguments: [type],
       nullabilitySuffix: NullabilitySuffix.question,
-    );
+    ) as InterfaceTypeImpl;
   }
 
   InterfaceTypeImpl futureStar(DartType type) {
     return typeProvider.futureElement.instantiate(
       typeArguments: [type],
       nullabilitySuffix: NullabilitySuffix.star,
-    );
+    ) as InterfaceTypeImpl;
   }
 
   DartType futureType(DartType T) {
diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
index 5a6b51f..d054a17 100644
--- a/pkg/analyzer/test/generated/parser_fasta_test.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
@@ -61,11 +61,11 @@
       sdkVersion: '2.0.0', additionalFeatures: [Feature.triple_shift]);
 
   void test_parse_member_called_late() {
-    CompilationUnitImpl unit = parseCompilationUnit(
+    var unit = parseCompilationUnit(
         'class C { void late() { new C().late(); } }',
         featureSet: nonNullable);
-    ClassDeclaration declaration = unit.declarations[0];
-    MethodDeclaration method = declaration.members[0];
+    var declaration = unit.declarations[0] as ClassDeclaration;
+    var method = declaration.members[0] as MethodDeclaration;
 
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -78,9 +78,9 @@
     expect(method.parameters, isNotNull);
     expect(method.body, isNotNull);
 
-    BlockFunctionBody body = method.body;
-    ExpressionStatement statement = body.block.statements[0];
-    MethodInvocation invocation = statement.expression;
+    var body = method.body as BlockFunctionBody;
+    var statement = body.block.statements[0] as ExpressionStatement;
+    var invocation = statement.expression as MethodInvocation;
     expect(invocation.operator.lexeme, '.');
     expect(invocation.toSource(), 'new C().late()');
   }
@@ -98,11 +98,11 @@
   }
 
   void test_parseClassMember_operator_gtgtgt() {
-    CompilationUnitImpl unit = parseCompilationUnit(
+    var unit = parseCompilationUnit(
         'class C { bool operator >>>(other) => false; }',
         featureSet: tripleShift);
-    ClassDeclaration declaration = unit.declarations[0];
-    MethodDeclaration method = declaration.members[0];
+    var declaration = unit.declarations[0] as ClassDeclaration;
+    var method = declaration.members[0] as MethodDeclaration;
 
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -117,7 +117,7 @@
   }
 
   void test_parseClassMember_operator_gtgtgteq() {
-    CompilationUnitImpl unit = parseCompilationUnit(
+    var unit = parseCompilationUnit(
         'class C { foo(int value) { x >>>= value; } }',
         featureSet: tripleShift);
     var declaration = unit.declarations[0] as ClassDeclaration;
@@ -506,376 +506,377 @@
   }
 
   void test_listLiteral_for() {
-    ListLiteral list = parseCollectionLiteral(
+    var list = parseCollectionLiteral(
       '[1, await for (var x in list) 2]',
       inAsync: true,
-    );
+    ) as ListLiteral;
     expect(list.elements, hasLength(2));
-    IntegerLiteral first = list.elements[0];
+    var first = list.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    ForElement second = list.elements[1];
+    var second = list.elements[1] as ForElement;
     expect(second.awaitKeyword, isNotNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
     expect(second.rightParenthesis.lexeme, ')');
-    ForEachPartsWithDeclaration forLoopParts = second.forLoopParts;
+    var forLoopParts = second.forLoopParts as ForEachPartsWithDeclaration;
     DeclaredIdentifier forLoopVar = forLoopParts.loopVariable;
     expect(forLoopVar.identifier.name, 'x');
     expect(forLoopParts.inKeyword, isNotNull);
-    SimpleIdentifier iterable = forLoopParts.iterable;
+    var iterable = forLoopParts.iterable as SimpleIdentifier;
     expect(iterable.name, 'list');
   }
 
   void test_listLiteral_forIf() {
-    ListLiteral list = parseCollectionLiteral(
+    var list = parseCollectionLiteral(
       '[1, await for (var x in list) if (c) 2]',
       inAsync: true,
-    );
+    ) as ListLiteral;
     expect(list.elements, hasLength(2));
-    IntegerLiteral first = list.elements[0];
+    var first = list.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    ForElement second = list.elements[1];
+    var second = list.elements[1] as ForElement;
     expect(second.awaitKeyword, isNotNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
     expect(second.rightParenthesis.lexeme, ')');
-    ForEachPartsWithDeclaration forLoopParts = second.forLoopParts;
+    var forLoopParts = second.forLoopParts as ForEachPartsWithDeclaration;
     DeclaredIdentifier forLoopVar = forLoopParts.loopVariable;
     expect(forLoopVar.identifier.name, 'x');
     expect(forLoopParts.inKeyword, isNotNull);
-    SimpleIdentifier iterable = forLoopParts.iterable;
+    var iterable = forLoopParts.iterable as SimpleIdentifier;
     expect(iterable.name, 'list');
 
-    IfElement body = second.body;
-    SimpleIdentifier condition = body.condition;
+    var body = second.body as IfElement;
+    var condition = body.condition as SimpleIdentifier;
     expect(condition.name, 'c');
-    IntegerLiteral thenElement = body.thenElement;
+    var thenElement = body.thenElement as IntegerLiteral;
     expect(thenElement.value, 2);
   }
 
   void test_listLiteral_forSpread() {
-    ListLiteral list =
-        parseCollectionLiteral('[1, for (int x = 0; x < 10; ++x) ...[2]]');
+    var list =
+        parseCollectionLiteral('[1, for (int x = 0; x < 10; ++x) ...[2]]')
+            as ListLiteral;
     expect(list.elements, hasLength(2));
-    IntegerLiteral first = list.elements[0];
+    var first = list.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    ForElement second = list.elements[1];
+    var second = list.elements[1] as ForElement;
     expect(second.awaitKeyword, isNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
     expect(second.rightParenthesis.lexeme, ')');
-    ForPartsWithDeclarations forLoopParts = second.forLoopParts;
+    var forLoopParts = second.forLoopParts as ForPartsWithDeclarations;
     VariableDeclaration forLoopVar = forLoopParts.variables.variables[0];
     expect(forLoopVar.name.name, 'x');
-    BinaryExpression condition = forLoopParts.condition;
-    IntegerLiteral rightOperand = condition.rightOperand;
+    var condition = forLoopParts.condition as BinaryExpression;
+    var rightOperand = condition.rightOperand as IntegerLiteral;
     expect(rightOperand.value, 10);
-    PrefixExpression updater = forLoopParts.updaters[0];
-    SimpleIdentifier updaterOperand = updater.operand;
+    var updater = forLoopParts.updaters[0] as PrefixExpression;
+    var updaterOperand = updater.operand as SimpleIdentifier;
     expect(updaterOperand.name, 'x');
   }
 
   void test_listLiteral_if() {
-    ListLiteral list = parseCollectionLiteral('[1, if (true) 2]');
+    var list = parseCollectionLiteral('[1, if (true) 2]') as ListLiteral;
     expect(list.elements, hasLength(2));
-    IntegerLiteral first = list.elements[0];
+    var first = list.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    IfElement second = list.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = list.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    IntegerLiteral thenElement = second.thenElement;
+    var thenElement = second.thenElement as IntegerLiteral;
     expect(thenElement.value, 2);
     expect(second.elseElement, isNull);
   }
 
   void test_listLiteral_ifElse() {
-    ListLiteral list = parseCollectionLiteral('[1, if (true) 2 else 5]');
+    var list = parseCollectionLiteral('[1, if (true) 2 else 5]') as ListLiteral;
     expect(list.elements, hasLength(2));
-    IntegerLiteral first = list.elements[0];
+    var first = list.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    IfElement second = list.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = list.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    IntegerLiteral thenElement = second.thenElement;
+    var thenElement = second.thenElement as IntegerLiteral;
     expect(thenElement.value, 2);
-    IntegerLiteral elseElement = second.elseElement;
+    var elseElement = second.elseElement as IntegerLiteral;
     expect(elseElement.value, 5);
   }
 
   void test_listLiteral_ifElseFor() {
-    ListLiteral list =
-        parseCollectionLiteral('[1, if (true) 2 else for (a in b) 5]');
+    var list = parseCollectionLiteral('[1, if (true) 2 else for (a in b) 5]')
+        as ListLiteral;
     expect(list.elements, hasLength(2));
-    IntegerLiteral first = list.elements[0];
+    var first = list.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    IfElement second = list.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = list.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    IntegerLiteral thenElement = second.thenElement;
+    var thenElement = second.thenElement as IntegerLiteral;
     expect(thenElement.value, 2);
 
-    ForElement elseElement = second.elseElement;
-    ForEachPartsWithIdentifier forLoopParts = elseElement.forLoopParts;
+    var elseElement = second.elseElement as ForElement;
+    var forLoopParts = elseElement.forLoopParts as ForEachPartsWithIdentifier;
     expect(forLoopParts.identifier.name, 'a');
 
-    IntegerLiteral forValue = elseElement.body;
+    var forValue = elseElement.body as IntegerLiteral;
     expect(forValue.value, 5);
   }
 
   void test_listLiteral_ifElseSpread() {
-    ListLiteral list =
-        parseCollectionLiteral('[1, if (true) ...[2] else ...?[5]]');
+    var list = parseCollectionLiteral('[1, if (true) ...[2] else ...?[5]]')
+        as ListLiteral;
     expect(list.elements, hasLength(2));
-    IntegerLiteral first = list.elements[0];
+    var first = list.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    IfElement second = list.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = list.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    SpreadElement thenElement = second.thenElement;
+    var thenElement = second.thenElement as SpreadElement;
     expect(thenElement.spreadOperator.lexeme, '...');
-    SpreadElement elseElement = second.elseElement;
+    var elseElement = second.elseElement as SpreadElement;
     expect(elseElement.spreadOperator.lexeme, '...?');
   }
 
   void test_listLiteral_ifFor() {
-    ListLiteral list = parseCollectionLiteral('[1, if (true) for (a in b) 2]');
+    var list =
+        parseCollectionLiteral('[1, if (true) for (a in b) 2]') as ListLiteral;
     expect(list.elements, hasLength(2));
-    IntegerLiteral first = list.elements[0];
+    var first = list.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    IfElement second = list.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = list.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
 
-    ForElement thenElement = second.thenElement;
-    ForEachPartsWithIdentifier forLoopParts = thenElement.forLoopParts;
+    var thenElement = second.thenElement as ForElement;
+    var forLoopParts = thenElement.forLoopParts as ForEachPartsWithIdentifier;
     expect(forLoopParts.identifier.name, 'a');
 
-    IntegerLiteral forValue = thenElement.body;
+    var forValue = thenElement.body as IntegerLiteral;
     expect(forValue.value, 2);
     expect(second.elseElement, isNull);
   }
 
   void test_listLiteral_ifSpread() {
-    ListLiteral list = parseCollectionLiteral('[1, if (true) ...[2]]');
+    var list = parseCollectionLiteral('[1, if (true) ...[2]]') as ListLiteral;
     expect(list.elements, hasLength(2));
-    IntegerLiteral first = list.elements[0];
+    var first = list.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    IfElement second = list.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = list.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    SpreadElement thenElement = second.thenElement;
+    var thenElement = second.thenElement as SpreadElement;
     expect(thenElement.spreadOperator.lexeme, '...');
     expect(second.elseElement, isNull);
   }
 
   void test_listLiteral_spread() {
-    ListLiteral list = parseCollectionLiteral('[1, ...[2]]');
+    var list = parseCollectionLiteral('[1, ...[2]]') as ListLiteral;
     expect(list.elements, hasLength(2));
-    IntegerLiteral first = list.elements[0];
+    var first = list.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    SpreadElement element = list.elements[1];
+    var element = list.elements[1] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...');
-    ListLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as ListLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_listLiteral_spreadQ() {
-    ListLiteral list = parseCollectionLiteral('[1, ...?[2]]');
+    var list = parseCollectionLiteral('[1, ...?[2]]') as ListLiteral;
     expect(list.elements, hasLength(2));
-    IntegerLiteral first = list.elements[0];
+    var first = list.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    SpreadElement element = list.elements[1];
+    var element = list.elements[1] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...?');
-    ListLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as ListLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_for() {
-    SetOrMapLiteral map = parseCollectionLiteral(
-        '{1:7, await for (y in list) 2:3}',
-        inAsync: true);
+    var map = parseCollectionLiteral('{1:7, await for (y in list) 2:3}',
+        inAsync: true) as SetOrMapLiteral;
     expect(map.elements, hasLength(2));
-    MapLiteralEntry first = map.elements[0];
-    IntegerLiteral firstValue = first.value;
+    var first = map.elements[0] as MapLiteralEntry;
+    var firstValue = first.value as IntegerLiteral;
     expect(firstValue.value, 7);
 
-    ForElement second = map.elements[1];
+    var second = map.elements[1] as ForElement;
     expect(second.awaitKeyword, isNotNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
     expect(second.rightParenthesis.lexeme, ')');
-    ForEachPartsWithIdentifier forLoopParts = second.forLoopParts;
+    var forLoopParts = second.forLoopParts as ForEachPartsWithIdentifier;
     SimpleIdentifier forLoopVar = forLoopParts.identifier;
     expect(forLoopVar.name, 'y');
     expect(forLoopParts.inKeyword, isNotNull);
-    SimpleIdentifier iterable = forLoopParts.iterable;
+    var iterable = forLoopParts.iterable as SimpleIdentifier;
     expect(iterable.name, 'list');
   }
 
   void test_mapLiteral_forIf() {
-    SetOrMapLiteral map = parseCollectionLiteral(
-        '{1:7, await for (y in list) if (c) 2:3}',
-        inAsync: true);
+    var map = parseCollectionLiteral('{1:7, await for (y in list) if (c) 2:3}',
+        inAsync: true) as SetOrMapLiteral;
     expect(map.elements, hasLength(2));
-    MapLiteralEntry first = map.elements[0];
-    IntegerLiteral firstValue = first.value;
+    var first = map.elements[0] as MapLiteralEntry;
+    var firstValue = first.value as IntegerLiteral;
     expect(firstValue.value, 7);
 
-    ForElement second = map.elements[1];
+    var second = map.elements[1] as ForElement;
     expect(second.awaitKeyword, isNotNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
     expect(second.rightParenthesis.lexeme, ')');
-    ForEachPartsWithIdentifier forLoopParts = second.forLoopParts;
+    var forLoopParts = second.forLoopParts as ForEachPartsWithIdentifier;
     SimpleIdentifier forLoopVar = forLoopParts.identifier;
     expect(forLoopVar.name, 'y');
     expect(forLoopParts.inKeyword, isNotNull);
-    SimpleIdentifier iterable = forLoopParts.iterable;
+    var iterable = forLoopParts.iterable as SimpleIdentifier;
     expect(iterable.name, 'list');
 
-    IfElement body = second.body;
-    SimpleIdentifier condition = body.condition;
+    var body = second.body as IfElement;
+    var condition = body.condition as SimpleIdentifier;
     expect(condition.name, 'c');
-    MapLiteralEntry thenElement = body.thenElement;
-    IntegerLiteral thenValue = thenElement.value;
+    var thenElement = body.thenElement as MapLiteralEntry;
+    var thenValue = thenElement.value as IntegerLiteral;
     expect(thenValue.value, 3);
   }
 
   void test_mapLiteral_forSpread() {
-    SetOrMapLiteral map =
-        parseCollectionLiteral('{1:7, for (x = 0; x < 10; ++x) ...{2:3}}');
+    var map = parseCollectionLiteral('{1:7, for (x = 0; x < 10; ++x) ...{2:3}}')
+        as SetOrMapLiteral;
     expect(map.elements, hasLength(2));
-    MapLiteralEntry first = map.elements[0];
-    IntegerLiteral firstValue = first.value;
+    var first = map.elements[0] as MapLiteralEntry;
+    var firstValue = first.value as IntegerLiteral;
     expect(firstValue.value, 7);
 
-    ForElement second = map.elements[1];
+    var second = map.elements[1] as ForElement;
     expect(second.awaitKeyword, isNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
     expect(second.rightParenthesis.lexeme, ')');
-    ForPartsWithExpression forLoopParts = second.forLoopParts;
-    AssignmentExpression forLoopInit = forLoopParts.initialization;
-    SimpleIdentifier forLoopVar = forLoopInit.leftHandSide;
+    var forLoopParts = second.forLoopParts as ForPartsWithExpression;
+    var forLoopInit = forLoopParts.initialization as AssignmentExpression;
+    var forLoopVar = forLoopInit.leftHandSide as SimpleIdentifier;
     expect(forLoopVar.name, 'x');
-    BinaryExpression condition = forLoopParts.condition;
-    IntegerLiteral rightOperand = condition.rightOperand;
+    var condition = forLoopParts.condition as BinaryExpression;
+    var rightOperand = condition.rightOperand as IntegerLiteral;
     expect(rightOperand.value, 10);
-    PrefixExpression updater = forLoopParts.updaters[0];
-    SimpleIdentifier updaterOperand = updater.operand;
+    var updater = forLoopParts.updaters[0] as PrefixExpression;
+    var updaterOperand = updater.operand as SimpleIdentifier;
     expect(updaterOperand.name, 'x');
   }
 
   void test_mapLiteral_if() {
-    SetOrMapLiteral map = parseCollectionLiteral('{1:1, if (true) 2:4}');
+    var map = parseCollectionLiteral('{1:1, if (true) 2:4}') as SetOrMapLiteral;
     expect(map.elements, hasLength(2));
-    MapLiteralEntry first = map.elements[0];
-    IntegerLiteral firstValue = first.value;
+    var first = map.elements[0] as MapLiteralEntry;
+    var firstValue = first.value as IntegerLiteral;
     expect(firstValue.value, 1);
 
-    IfElement second = map.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = map.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    MapLiteralEntry thenElement = second.thenElement;
-    IntegerLiteral thenElementValue = thenElement.value;
+    var thenElement = second.thenElement as MapLiteralEntry;
+    var thenElementValue = thenElement.value as IntegerLiteral;
     expect(thenElementValue.value, 4);
     expect(second.elseElement, isNull);
   }
 
   void test_mapLiteral_ifElse() {
-    SetOrMapLiteral map =
-        parseCollectionLiteral('{1:1, if (true) 2:4 else 5:6}');
+    var map = parseCollectionLiteral('{1:1, if (true) 2:4 else 5:6}')
+        as SetOrMapLiteral;
     expect(map.elements, hasLength(2));
-    MapLiteralEntry first = map.elements[0];
-    IntegerLiteral firstValue = first.value;
+    var first = map.elements[0] as MapLiteralEntry;
+    var firstValue = first.value as IntegerLiteral;
     expect(firstValue.value, 1);
 
-    IfElement second = map.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = map.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    MapLiteralEntry thenElement = second.thenElement;
-    IntegerLiteral thenElementValue = thenElement.value;
+    var thenElement = second.thenElement as MapLiteralEntry;
+    var thenElementValue = thenElement.value as IntegerLiteral;
     expect(thenElementValue.value, 4);
-    MapLiteralEntry elseElement = second.elseElement;
-    IntegerLiteral elseElementValue = elseElement.value;
+    var elseElement = second.elseElement as MapLiteralEntry;
+    var elseElementValue = elseElement.value as IntegerLiteral;
     expect(elseElementValue.value, 6);
   }
 
   void test_mapLiteral_ifElseFor() {
-    SetOrMapLiteral map =
-        parseCollectionLiteral('{1:1, if (true) 2:4 else for (c in d) 5:6}');
+    var map =
+        parseCollectionLiteral('{1:1, if (true) 2:4 else for (c in d) 5:6}')
+            as SetOrMapLiteral;
     expect(map.elements, hasLength(2));
-    MapLiteralEntry first = map.elements[0];
-    IntegerLiteral firstValue = first.value;
+    var first = map.elements[0] as MapLiteralEntry;
+    var firstValue = first.value as IntegerLiteral;
     expect(firstValue.value, 1);
 
-    IfElement second = map.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = map.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    MapLiteralEntry thenElement = second.thenElement;
-    IntegerLiteral thenElementValue = thenElement.value;
+    var thenElement = second.thenElement as MapLiteralEntry;
+    var thenElementValue = thenElement.value as IntegerLiteral;
     expect(thenElementValue.value, 4);
 
-    ForElement elseElement = second.elseElement;
-    ForEachPartsWithIdentifier forLoopParts = elseElement.forLoopParts;
+    var elseElement = second.elseElement as ForElement;
+    var forLoopParts = elseElement.forLoopParts as ForEachPartsWithIdentifier;
     expect(forLoopParts.identifier.name, 'c');
 
-    MapLiteralEntry body = elseElement.body;
-    IntegerLiteral bodyValue = body.value;
+    var body = elseElement.body as MapLiteralEntry;
+    var bodyValue = body.value as IntegerLiteral;
     expect(bodyValue.value, 6);
   }
 
   void test_mapLiteral_ifElseSpread() {
-    SetOrMapLiteral map =
-        parseCollectionLiteral('{1:7, if (true) ...{2:4} else ...?{5:6}}');
+    var map = parseCollectionLiteral('{1:7, if (true) ...{2:4} else ...?{5:6}}')
+        as SetOrMapLiteral;
     expect(map.elements, hasLength(2));
-    MapLiteralEntry first = map.elements[0];
-    IntegerLiteral firstValue = first.value;
+    var first = map.elements[0] as MapLiteralEntry;
+    var firstValue = first.value as IntegerLiteral;
     expect(firstValue.value, 7);
 
-    IfElement second = map.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = map.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    SpreadElement thenElement = second.thenElement;
+    var thenElement = second.thenElement as SpreadElement;
     expect(thenElement.spreadOperator.lexeme, '...');
-    SpreadElement elseElement = second.elseElement;
+    var elseElement = second.elseElement as SpreadElement;
     expect(elseElement.spreadOperator.lexeme, '...?');
-    SetOrMapLiteral elseElementExpression = elseElement.expression;
+    var elseElementExpression = elseElement.expression as SetOrMapLiteral;
     expect(elseElementExpression.elements, hasLength(1));
-    MapLiteralEntry entry = elseElementExpression.elements[0];
-    IntegerLiteral entryValue = entry.value;
+    var entry = elseElementExpression.elements[0] as MapLiteralEntry;
+    var entryValue = entry.value as IntegerLiteral;
     expect(entryValue.value, 6);
   }
 
   void test_mapLiteral_ifFor() {
-    SetOrMapLiteral map =
-        parseCollectionLiteral('{1:1, if (true) for (a in b) 2:4}');
+    var map = parseCollectionLiteral('{1:1, if (true) for (a in b) 2:4}')
+        as SetOrMapLiteral;
     expect(map.elements, hasLength(2));
-    MapLiteralEntry first = map.elements[0];
-    IntegerLiteral firstValue = first.value;
+    var first = map.elements[0] as MapLiteralEntry;
+    var firstValue = first.value as IntegerLiteral;
     expect(firstValue.value, 1);
 
-    IfElement second = map.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = map.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
 
-    ForElement thenElement = second.thenElement;
-    ForEachPartsWithIdentifier forLoopParts = thenElement.forLoopParts;
+    var thenElement = second.thenElement as ForElement;
+    var forLoopParts = thenElement.forLoopParts as ForEachPartsWithIdentifier;
     expect(forLoopParts.identifier.name, 'a');
 
-    MapLiteralEntry body = thenElement.body;
-    IntegerLiteral thenElementValue = body.value;
+    var body = thenElement.body as MapLiteralEntry;
+    var thenElementValue = body.value as IntegerLiteral;
     expect(thenElementValue.value, 4);
     expect(second.elseElement, isNull);
   }
@@ -883,229 +884,234 @@
   void test_mapLiteral_ifSpread() {
     SetOrMapLiteral map = parseCollectionLiteral('{1:1, if (true) ...{2:4}}');
     expect(map.elements, hasLength(2));
-    MapLiteralEntry first = map.elements[0];
-    IntegerLiteral firstValue = first.value;
+    var first = map.elements[0] as MapLiteralEntry;
+    var firstValue = first.value as IntegerLiteral;
     expect(firstValue.value, 1);
 
-    IfElement second = map.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = map.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    SpreadElement thenElement = second.thenElement;
+    var thenElement = second.thenElement as SpreadElement;
     expect(thenElement.spreadOperator.lexeme, '...');
     expect(second.elseElement, isNull);
   }
 
   void test_mapLiteral_spread() {
-    SetOrMapLiteral map = parseCollectionLiteral('{1: 2, ...{3: 4}}');
+    var map = parseCollectionLiteral('{1: 2, ...{3: 4}}') as SetOrMapLiteral;
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
     expect(map.elements, hasLength(2));
 
-    SpreadElement element = map.elements[1];
+    var element = map.elements[1] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...');
-    SetOrMapLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as SetOrMapLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spread2_typed() {
-    SetOrMapLiteral map = parseCollectionLiteral('<int, int>{1: 2, ...{3: 4}}');
+    var map = parseCollectionLiteral('<int, int>{1: 2, ...{3: 4}}')
+        as SetOrMapLiteral;
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
     expect(map.elements, hasLength(2));
 
-    SpreadElement element = map.elements[1];
+    var element = map.elements[1] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...');
-    SetOrMapLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as SetOrMapLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spread_typed() {
-    SetOrMapLiteral map = parseCollectionLiteral('<int, int>{...{3: 4}}');
+    var map =
+        parseCollectionLiteral('<int, int>{...{3: 4}}') as SetOrMapLiteral;
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
     expect(map.elements, hasLength(1));
 
-    SpreadElement element = map.elements[0];
+    var element = map.elements[0] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...');
-    SetOrMapLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as SetOrMapLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ() {
-    SetOrMapLiteral map = parseCollectionLiteral('{1: 2, ...?{3: 4}}');
+    var map = parseCollectionLiteral('{1: 2, ...?{3: 4}}') as SetOrMapLiteral;
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
     expect(map.elements, hasLength(2));
 
-    SpreadElement element = map.elements[1];
+    var element = map.elements[1] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...?');
-    SetOrMapLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as SetOrMapLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ2_typed() {
-    SetOrMapLiteral map =
-        parseCollectionLiteral('<int, int>{1: 2, ...?{3: 4}}');
+    var map = parseCollectionLiteral('<int, int>{1: 2, ...?{3: 4}}')
+        as SetOrMapLiteral;
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
     expect(map.elements, hasLength(2));
 
-    SpreadElement element = map.elements[1];
+    var element = map.elements[1] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...?');
-    SetOrMapLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as SetOrMapLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ_typed() {
-    SetOrMapLiteral map = parseCollectionLiteral('<int, int>{...?{3: 4}}');
+    var map =
+        parseCollectionLiteral('<int, int>{...?{3: 4}}') as SetOrMapLiteral;
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
     expect(map.elements, hasLength(1));
 
-    SpreadElement element = map.elements[0];
+    var element = map.elements[0] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...?');
-    SetOrMapLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as SetOrMapLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_if() {
-    SetOrMapLiteral setLiteral = parseCollectionLiteral('{1, if (true) 2}');
+    var setLiteral =
+        parseCollectionLiteral('{1, if (true) 2}') as SetOrMapLiteral;
     expect(setLiteral.elements, hasLength(2));
-    IntegerLiteral first = setLiteral.elements[0];
+    var first = setLiteral.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    IfElement second = setLiteral.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = setLiteral.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    IntegerLiteral thenElement = second.thenElement;
+    var thenElement = second.thenElement as IntegerLiteral;
     expect(thenElement.value, 2);
     expect(second.elseElement, isNull);
   }
 
   void test_setLiteral_ifElse() {
-    SetOrMapLiteral setLiteral =
-        parseCollectionLiteral('{1, if (true) 2 else 5}');
+    var setLiteral =
+        parseCollectionLiteral('{1, if (true) 2 else 5}') as SetOrMapLiteral;
     expect(setLiteral.elements, hasLength(2));
-    IntegerLiteral first = setLiteral.elements[0];
+    var first = setLiteral.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    IfElement second = setLiteral.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = setLiteral.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    IntegerLiteral thenElement = second.thenElement;
+    var thenElement = second.thenElement as IntegerLiteral;
     expect(thenElement.value, 2);
-    IntegerLiteral elseElement = second.elseElement;
+    var elseElement = second.elseElement as IntegerLiteral;
     expect(elseElement.value, 5);
   }
 
   void test_setLiteral_ifElseSpread() {
-    SetOrMapLiteral setLiteral =
-        parseCollectionLiteral('{1, if (true) ...{2} else ...?[5]}');
+    var setLiteral =
+        parseCollectionLiteral('{1, if (true) ...{2} else ...?[5]}')
+            as SetOrMapLiteral;
     expect(setLiteral.elements, hasLength(2));
-    IntegerLiteral first = setLiteral.elements[0];
+    var first = setLiteral.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    IfElement second = setLiteral.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = setLiteral.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    SpreadElement thenElement = second.thenElement;
+    var thenElement = second.thenElement as SpreadElement;
     expect(thenElement.spreadOperator.lexeme, '...');
-    SetOrMapLiteral theExpression = thenElement.expression;
+    var theExpression = thenElement.expression as SetOrMapLiteral;
     expect(theExpression.elements, hasLength(1));
-    SpreadElement elseElement = second.elseElement;
+    var elseElement = second.elseElement as SpreadElement;
     expect(elseElement.spreadOperator.lexeme, '...?');
-    ListLiteral elseExpression = elseElement.expression;
+    var elseExpression = elseElement.expression as ListLiteral;
     expect(elseExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_ifSpread() {
-    SetOrMapLiteral setLiteral =
-        parseCollectionLiteral('{1, if (true) ...[2]}');
+    var setLiteral =
+        parseCollectionLiteral('{1, if (true) ...[2]}') as SetOrMapLiteral;
     expect(setLiteral.elements, hasLength(2));
-    IntegerLiteral first = setLiteral.elements[0];
+    var first = setLiteral.elements[0] as IntegerLiteral;
     expect(first.value, 1);
 
-    IfElement second = setLiteral.elements[1];
-    BooleanLiteral condition = second.condition;
+    var second = setLiteral.elements[1] as IfElement;
+    var condition = second.condition as BooleanLiteral;
     expect(condition.value, isTrue);
-    SpreadElement thenElement = second.thenElement;
+    var thenElement = second.thenElement as SpreadElement;
     expect(thenElement.spreadOperator.lexeme, '...');
     expect(second.elseElement, isNull);
   }
 
   void test_setLiteral_spread2() {
-    SetOrMapLiteral set = parseCollectionLiteral('{3, ...[4]}');
+    var set = parseCollectionLiteral('{3, ...[4]}') as SetOrMapLiteral;
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNull);
     expect(set.elements, hasLength(2));
-    IntegerLiteral value = set.elements[0];
+    var value = set.elements[0] as IntegerLiteral;
     expect(value.value, 3);
 
-    SpreadElement element = set.elements[1];
+    var element = set.elements[1] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...');
-    ListLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as ListLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_spread2Q() {
-    SetOrMapLiteral set = parseCollectionLiteral('{3, ...?[4]}');
+    var set = parseCollectionLiteral('{3, ...?[4]}') as SetOrMapLiteral;
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNull);
     expect(set.elements, hasLength(2));
-    IntegerLiteral value = set.elements[0];
+    var value = set.elements[0] as IntegerLiteral;
     expect(value.value, 3);
 
-    SpreadElement element = set.elements[1];
+    var element = set.elements[1] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...?');
-    ListLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as ListLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_spread_typed() {
-    SetOrMapLiteral set = parseCollectionLiteral('<int>{...[3]}');
+    var set = parseCollectionLiteral('<int>{...[3]}') as SetOrMapLiteral;
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNotNull);
     expect(set.elements, hasLength(1));
 
-    SpreadElement element = set.elements[0];
+    var element = set.elements[0] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...');
-    ListLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as ListLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_spreadQ_typed() {
-    SetOrMapLiteral set = parseCollectionLiteral('<int>{...?[3]}');
+    var set = parseCollectionLiteral('<int>{...?[3]}') as SetOrMapLiteral;
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNotNull);
     expect(set.elements, hasLength(1));
 
-    SpreadElement element = set.elements[0];
+    var element = set.elements[0] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...?');
-    ListLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as ListLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setOrMapLiteral_spread() {
-    SetOrMapLiteral map = parseCollectionLiteral('{...{3: 4}}');
+    var map = parseCollectionLiteral('{...{3: 4}}') as SetOrMapLiteral;
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
     expect(map.elements, hasLength(1));
 
-    SpreadElement element = map.elements[0];
+    var element = map.elements[0] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...');
-    SetOrMapLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as SetOrMapLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setOrMapLiteral_spreadQ() {
-    SetOrMapLiteral map = parseCollectionLiteral('{...?{3: 4}}');
+    var map = parseCollectionLiteral('{...?{3: 4}}') as SetOrMapLiteral;
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
     expect(map.elements, hasLength(1));
 
-    SpreadElement element = map.elements[0];
+    var element = map.elements[0] as SpreadElement;
     expect(element.spreadOperator.lexeme, '...?');
-    SetOrMapLiteral spreadExpression = element.expression;
+    var spreadExpression = element.expression as SetOrMapLiteral;
     expect(spreadExpression.elements, hasLength(1));
   }
 }
@@ -1115,21 +1121,22 @@
 class ComplexParserTest_Fasta extends FastaParserTestCase
     with ComplexParserTestMixin {
   void test_binary_operator_written_out_expression() {
-    BinaryExpression expression = parseExpression('x xor y', errors: [
+    var expression = parseExpression('x xor y', errors: [
       expectedError(ParserErrorCode.BINARY_OPERATOR_WRITTEN_OUT, 2, 3),
-    ]);
-    SimpleIdentifier lhs = expression.leftOperand;
+    ]) as BinaryExpression;
+    var lhs = expression.leftOperand as SimpleIdentifier;
     expect(lhs.name, 'x');
     expect(expression.operator.lexeme, '^');
-    SimpleIdentifier rhs = expression.rightOperand;
+    var rhs = expression.rightOperand as SimpleIdentifier;
     expect(rhs.name, 'y');
   }
 
   void test_conditionalExpression_precedence_nullableType_as2() {
-    ExpressionStatement statement = parseStatement('x as bool? ? (x + y) : z;');
-    ConditionalExpression expression = statement.expression;
-    AsExpression asExpression = expression.condition;
-    TypeName type = asExpression.type;
+    var statement =
+        parseStatement('x as bool? ? (x + y) : z;') as ExpressionStatement;
+    var expression = statement.expression as ConditionalExpression;
+    var asExpression = expression.condition as AsExpression;
+    var type = asExpression.type as TypeName;
     expect(type.question.lexeme, '?');
     Expression thenExpression = expression.thenExpression;
     expect(thenExpression, isParenthesizedExpression);
@@ -1140,12 +1147,12 @@
   }
 
   void test_conditionalExpression_precedence_nullableType_as3() {
-    ExpressionStatement statement =
-        parseStatement('(x as bool?) ? (x + y) : z;');
-    ConditionalExpression expression = statement.expression;
-    ParenthesizedExpression condition = expression.condition;
-    AsExpression asExpression = condition.expression;
-    TypeName type = asExpression.type;
+    var statement =
+        parseStatement('(x as bool?) ? (x + y) : z;') as ExpressionStatement;
+    var expression = statement.expression as ConditionalExpression;
+    var condition = expression.condition as ParenthesizedExpression;
+    var asExpression = condition.expression as AsExpression;
+    var type = asExpression.type as TypeName;
     expect(type.question.lexeme, '?');
     Expression thenExpression = expression.thenExpression;
     expect(thenExpression, isParenthesizedExpression);
@@ -1156,11 +1163,11 @@
   }
 
   void test_conditionalExpression_precedence_nullableType_is2() {
-    ExpressionStatement statement =
-        parseStatement('x is String? ? (x + y) : z;');
-    ConditionalExpression expression = statement.expression;
-    IsExpression isExpression = expression.condition;
-    TypeName type = isExpression.type;
+    var statement =
+        parseStatement('x is String? ? (x + y) : z;') as ExpressionStatement;
+    var expression = statement.expression as ConditionalExpression;
+    var isExpression = expression.condition as IsExpression;
+    var type = isExpression.type as TypeName;
     expect(type.question.lexeme, '?');
     Expression thenExpression = expression.thenExpression;
     expect(thenExpression, isParenthesizedExpression);
@@ -1171,12 +1178,12 @@
   }
 
   void test_conditionalExpression_precedence_nullableType_is3() {
-    ExpressionStatement statement =
-        parseStatement('(x is String?) ? (x + y) : z;');
-    ConditionalExpression expression = statement.expression;
-    ParenthesizedExpression condition = expression.condition;
-    IsExpression isExpression = condition.expression;
-    TypeName type = isExpression.type;
+    var statement =
+        parseStatement('(x is String?) ? (x + y) : z;') as ExpressionStatement;
+    var expression = statement.expression as ConditionalExpression;
+    var condition = expression.condition as ParenthesizedExpression;
+    var isExpression = condition.expression as IsExpression;
+    var type = isExpression.type as TypeName;
     expect(type.question.lexeme, '?');
     Expression thenExpression = expression.thenExpression;
     expect(thenExpression, isParenthesizedExpression);
@@ -1447,53 +1454,53 @@
 
   void test_lt_dot_bracket_quote() {
     // https://github.com/dart-lang/sdk/issues/37674
-    ListLiteral list = parseExpression('<.["', errors: [
+    var list = parseExpression('<.["', errors: [
       expectedError(ParserErrorCode.EXPECTED_TYPE_NAME, 1, 1),
       expectedError(ParserErrorCode.EXPECTED_TYPE_NAME, 2, 1),
       expectedError(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 3, 1),
       expectedError(ScannerErrorCode.EXPECTED_TOKEN, 4, 1),
-    ]);
+    ]) as ListLiteral;
     expect(list.elements, hasLength(1));
-    StringLiteral first = list.elements[0];
+    var first = list.elements[0] as StringLiteral;
     expect(first.length, 1);
   }
 
   void test_lt_dot_listLiteral() {
     // https://github.com/dart-lang/sdk/issues/37674
-    ListLiteral list = parseExpression('<.[]', errors: [
+    var list = parseExpression('<.[]', errors: [
       expectedError(ParserErrorCode.EXPECTED_TYPE_NAME, 1, 1),
       expectedError(ParserErrorCode.EXPECTED_TYPE_NAME, 2, 2),
-    ]);
+    ]) as ListLiteral;
     expect(list.elements, hasLength(0));
   }
 
   void test_mapLiteral() {
-    SetOrMapLiteral map = parseExpression('{3: 6}');
+    var map = parseExpression('{3: 6}') as SetOrMapLiteral;
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
     expect(map.elements, hasLength(1));
-    MapLiteralEntry entry = map.elements[0];
-    IntegerLiteral key = entry.key;
+    var entry = map.elements[0] as MapLiteralEntry;
+    var key = entry.key as IntegerLiteral;
     expect(key.value, 3);
-    IntegerLiteral value = entry.value;
+    var value = entry.value as IntegerLiteral;
     expect(value.value, 6);
   }
 
   void test_mapLiteral_const() {
-    SetOrMapLiteral map = parseExpression('const {3: 6}');
+    var map = parseExpression('const {3: 6}') as SetOrMapLiteral;
     expect(map.constKeyword, isNotNull);
     expect(map.typeArguments, isNull);
     expect(map.elements, hasLength(1));
-    MapLiteralEntry entry = map.elements[0];
-    IntegerLiteral key = entry.key;
+    var entry = map.elements[0] as MapLiteralEntry;
+    var key = entry.key as IntegerLiteral;
     expect(key.value, 3);
-    IntegerLiteral value = entry.value;
+    var value = entry.value as IntegerLiteral;
     expect(value.value, 6);
   }
 
   @failingTest
   void test_mapLiteral_invalid_too_many_type_arguments1() {
-    SetOrMapLiteral map = parseExpression('<int, int, int>{}', errors: [
+    var map = parseExpression('<int, int, int>{}', errors: [
       // TODO(danrubel): Currently the resolver reports invalid number of
       // type arguments, but the parser could report this.
       expectedError(
@@ -1501,14 +1508,14 @@
           ParserErrorCode.EXPECTED_TOKEN,
           11,
           3),
-    ]);
+    ]) as SetOrMapLiteral;
     expect(map.constKeyword, isNull);
     expect(map.elements, hasLength(0));
   }
 
   @failingTest
   void test_mapLiteral_invalid_too_many_type_arguments2() {
-    SetOrMapLiteral map = parseExpression('<int, int, int>{1}', errors: [
+    var map = parseExpression('<int, int, int>{1}', errors: [
       // TODO(danrubel): Currently the resolver reports invalid number of
       // type arguments, but the parser could report this.
       expectedError(
@@ -1516,7 +1523,7 @@
           ParserErrorCode.EXPECTED_TOKEN,
           11,
           3),
-    ]);
+    ]) as SetOrMapLiteral;
     expect(map.constKeyword, isNull);
     expect(map.elements, hasLength(0));
   }
@@ -1535,7 +1542,7 @@
       expectedError(ParserErrorCode.EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD, 8, 4)
     ]);
     expect(expression, isStringInterpolation);
-    StringInterpolation literal = expression;
+    var literal = expression as StringInterpolation;
     NodeList<InterpolationElement> elements = literal.elements;
     expect(elements, hasLength(3));
     expect(elements[0] is InterpolationString, isTrue);
diff --git a/pkg/analyzer/test/generated/source_factory_test.dart b/pkg/analyzer/test/generated/source_factory_test.dart
index 3f89277..3ec4b21 100644
--- a/pkg/analyzer/test/generated/source_factory_test.dart
+++ b/pkg/analyzer/test/generated/source_factory_test.dart
@@ -40,15 +40,6 @@
   }
 }
 
-class CustomUriResolver extends UriResolver {
-  String uriPath;
-  CustomUriResolver({this.uriPath});
-
-  @override
-  Source resolveAbsolute(Uri uri, [Uri actualUri]) =>
-      createSource(path: uriPath);
-}
-
 @reflectiveTest
 class SourceFactoryTest with ResourceProviderMixin {
   void test_creation() {
diff --git a/pkg/analyzer/test/generated/utilities_test.dart b/pkg/analyzer/test/generated/utilities_test.dart
index 78ad197..1bb1df6 100644
--- a/pkg/analyzer/test/generated/utilities_test.dart
+++ b/pkg/analyzer/test/generated/utilities_test.dart
@@ -1165,14 +1165,14 @@
 
   Expression _parseExpression(String code) {
     CompilationUnit unit = _parseUnit('var v = $code;');
-    TopLevelVariableDeclaration decl = unit.declarations.single;
+    var decl = unit.declarations.single as TopLevelVariableDeclaration;
     return decl.variables.variables.single.initializer;
   }
 
   Statement _parseStatement(String code) {
     CompilationUnit unit = _parseUnit('main() async { $code }');
-    FunctionDeclaration main = unit.declarations.single;
-    BlockFunctionBody body = main.functionExpression.body;
+    var main = unit.declarations.single as FunctionDeclaration;
+    var body = main.functionExpression.body as BlockFunctionBody;
     return body.block.statements.single;
   }
 
diff --git a/pkg/analyzer/test/src/dart/ast/ast_test.dart b/pkg/analyzer/test/src/dart/ast/ast_test.dart
index 8ab94b5..bb96a03 100644
--- a/pkg/analyzer/test/src/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/ast_test.dart
@@ -21,8 +21,8 @@
 
 @reflectiveTest
 class CompilationUnitImplTest extends ParserTestCase {
-  String testSource;
-  CompilationUnitImpl testUnit;
+  /*late*/ String testSource;
+  /*late*/ CompilationUnitImpl testUnit;
 
   parse(String source) {
     testSource = source;
@@ -84,7 +84,7 @@
     int index = testSource.indexOf(snippet);
     expect(index >= 0, isTrue);
     NodeLocator visitor = NodeLocator(index);
-    AstNodeImpl node = visitor.searchWithin(testUnit);
+    var node = visitor.searchWithin(testUnit) as AstNodeImpl;
     expect(node, TypeMatcher<ExpressionImpl>());
     expect((node as ExpressionImpl).inConstantContext,
         isInContext ? isTrue : isFalse);
diff --git a/pkg/analyzer/test/src/dart/ast/constant_evaluator_test.dart b/pkg/analyzer/test/src/dart/ast/constant_evaluator_test.dart
index ac0dc66..dfa42c6 100644
--- a/pkg/analyzer/test/src/dart/ast/constant_evaluator_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/constant_evaluator_test.dart
@@ -18,17 +18,17 @@
 @reflectiveTest
 class ConstantEvaluatorTest extends ParseBase {
   void test_binary_bitAnd() {
-    int value = _getConstantValue("74 & 42");
+    var value = _getConstantValue("74 & 42") as int;
     expect(value, 74 & 42);
   }
 
   void test_binary_bitOr() {
-    int value = _getConstantValue("74 | 42");
+    var value = _getConstantValue("74 | 42") as int;
     expect(value, 74 | 42);
   }
 
   void test_binary_bitXor() {
-    int value = _getConstantValue("74 ^ 42");
+    var value = _getConstantValue("74 ^ 42") as int;
     expect(value, 74 ^ 42);
   }
 
@@ -78,7 +78,7 @@
   }
 
   void test_binary_leftShift() {
-    int value = _getConstantValue("16 << 2");
+    var value = _getConstantValue("16 << 2") as int;
     expect(value, 64);
   }
 
@@ -183,7 +183,7 @@
   }
 
   void test_binary_rightShift() {
-    int value = _getConstantValue("64 >> 2");
+    var value = _getConstantValue("64 >> 2") as int;
     expect(value, 16);
   }
 
@@ -198,12 +198,12 @@
   }
 
   void test_binary_truncatingDivide_double() {
-    int value = _getConstantValue("3.2 ~/ 2.3");
+    var value = _getConstantValue("3.2 ~/ 2.3") as int;
     expect(value, 1);
   }
 
   void test_binary_truncatingDivide_integer() {
-    int value = _getConstantValue("10 ~/ 3");
+    var value = _getConstantValue("10 ~/ 3") as int;
     expect(value, 3);
   }
 
@@ -260,7 +260,7 @@
   }
 
   void test_literal_list() {
-    List value = _getConstantValue("['a', 'b', 'c']");
+    var value = _getConstantValue("['a', 'b', 'c']") as List<Object>;
     expect(value.length, 3);
     expect(value[0], "a");
     expect(value[1], "b");
@@ -268,7 +268,8 @@
   }
 
   void test_literal_map() {
-    Map value = _getConstantValue("{'a' : 'm', 'b' : 'n', 'c' : 'o'}");
+    var value = _getConstantValue("{'a' : 'm', 'b' : 'n', 'c' : 'o'}")
+        as Map<Object, Object>;
     expect(value.length, 3);
     expect(value["a"], "m");
     expect(value["b"], "n");
@@ -316,7 +317,7 @@
   }
 
   void test_unary_bitNot() {
-    int value = _getConstantValue("~42");
+    var value = _getConstantValue("~42") as int;
     expect(value, ~42);
   }
 
diff --git a/pkg/analyzer/test/src/dart/ast/to_source_visitor_test.dart b/pkg/analyzer/test/src/dart/ast/to_source_visitor_test.dart
index 4fe02d3..2898bae 100644
--- a/pkg/analyzer/test/src/dart/ast/to_source_visitor_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/to_source_visitor_test.dart
@@ -987,8 +987,8 @@
   }
 
   void test_visitFieldFormalParameter_type_covariant() {
-    FieldFormalParameterImpl expected = AstTestFactory.fieldFormalParameter(
-        null, AstTestFactory.typeName4("A"), "a");
+    var expected = AstTestFactory.fieldFormalParameter(
+        null, AstTestFactory.typeName4("A"), "a") as FieldFormalParameterImpl;
     expected.covariantKeyword =
         TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
     _assertSource("covariant A this.a", expected);
@@ -1570,9 +1570,8 @@
   }
 
   void test_visitFunctionTypedFormalParameter_type_covariant() {
-    FunctionTypedFormalParameterImpl expected =
-        AstTestFactory.functionTypedFormalParameter(
-            AstTestFactory.typeName4("T"), "f");
+    var expected = AstTestFactory.functionTypedFormalParameter(
+        AstTestFactory.typeName4("T"), "f") as FunctionTypedFormalParameterImpl;
     expected.covariantKeyword =
         TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
     _assertSource("covariant T f()", expected);
@@ -2471,8 +2470,8 @@
   }
 
   void test_visitSimpleFormalParameter_type_covariant() {
-    SimpleFormalParameterImpl expected = AstTestFactory.simpleFormalParameter4(
-        AstTestFactory.typeName4("A"), "a");
+    var expected = AstTestFactory.simpleFormalParameter4(
+        AstTestFactory.typeName4("A"), "a") as SimpleFormalParameterImpl;
     expected.covariantKeyword =
         TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
     _assertSource("covariant A a", expected);
diff --git a/pkg/analyzer/test/src/dart/ast/utilities_test.dart b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
index 7ffec93..f0b6733 100644
--- a/pkg/analyzer/test/src/dart/ast/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
@@ -37,7 +37,7 @@
     String code = ' int vv; ';
     //             012345678
     CompilationUnit unit = parseCompilationUnit(code);
-    TopLevelVariableDeclaration declaration = unit.declarations[0];
+    var declaration = unit.declarations[0] as TopLevelVariableDeclaration;
     VariableDeclarationList variableList = declaration.variables;
     Identifier typeName = (variableList.type as TypeName).name;
     SimpleIdentifier varName = variableList.variables[0].name;
@@ -58,7 +58,7 @@
     String code = ' int vv; ';
     //             012345678
     CompilationUnit unit = parseCompilationUnit(code);
-    TopLevelVariableDeclaration declaration = unit.declarations[0];
+    var declaration = unit.declarations[0] as TopLevelVariableDeclaration;
     VariableDeclarationList variableList = declaration.variables;
     Identifier typeName = (variableList.type as TypeName).name;
     SimpleIdentifier varName = variableList.variables[0].name;
@@ -277,11 +277,11 @@
   void test_visitConstructorDeclaration() {
     String className = "A";
     String constructorName = "c";
-    ConstructorDeclarationImpl fromNode = AstTestFactory.constructorDeclaration(
+    var fromNode = AstTestFactory.constructorDeclaration(
         AstTestFactory.identifier3(className),
         constructorName,
         AstTestFactory.formalParameterList(),
-        null);
+        null) as ConstructorDeclarationImpl;
     ConstructorElement element = ElementFactory.constructorElement2(
         ElementFactory.classElement2(className), constructorName);
     fromNode.declaredElement = element;
@@ -472,7 +472,7 @@
     DartType typeC = interfaceTypeStar(ElementFactory.classElement2('C'));
 
     ForStatement fromNode = createNode();
-    ForEachPartsWithIdentifier fromForLoopParts = fromNode.forLoopParts;
+    var fromForLoopParts = fromNode.forLoopParts as ForEachPartsWithIdentifier;
     fromForLoopParts.identifier.staticType = typeA;
     (fromForLoopParts.iterable as SimpleIdentifier).staticType = typeB;
     ((fromNode.body as ExpressionStatement).expression as SimpleIdentifier)
@@ -480,7 +480,7 @@
 
     ForStatement toNode = createNode();
     ResolutionCopier.copyResolutionData(fromNode, toNode);
-    ForEachPartsWithIdentifier toForLoopParts = fromNode.forLoopParts;
+    var toForLoopParts = fromNode.forLoopParts as ForEachPartsWithIdentifier;
     expect(toForLoopParts.identifier.staticType, same(typeA));
     expect(
         (toForLoopParts.iterable as SimpleIdentifier).staticType, same(typeB));
@@ -491,9 +491,9 @@
   }
 
   void test_visitFunctionExpression() {
-    FunctionExpressionImpl fromNode = AstTestFactory.functionExpression2(
+    var fromNode = AstTestFactory.functionExpression2(
         AstTestFactory.formalParameterList(),
-        AstTestFactory.emptyFunctionBody());
+        AstTestFactory.emptyFunctionBody()) as FunctionExpressionImpl;
     MethodElement element = ElementFactory.methodElement(
         "m", interfaceTypeStar(ElementFactory.classElement2('C')));
     fromNode.declaredElement = element;
diff --git a/pkg/dartdev/lib/src/experiments.dart b/pkg/dartdev/lib/src/experiments.dart
index ebbff07..36d4bd8 100644
--- a/pkg/dartdev/lib/src/experiments.dart
+++ b/pkg/dartdev/lib/src/experiments.dart
@@ -39,13 +39,22 @@
 extension EnabledExperimentsArg on ArgResults {
   List<String> get enabledExperiments {
     List<String> enabledExperiments = [];
+    // Check to see if the ArgParser which generated this result accepts
+    // --enable-experiment as an option. If so, return the result if it was
+    // provided.
     if (options.contains(experimentFlagName)) {
       if (wasParsed(experimentFlagName)) {
         enabledExperiments = this[experimentFlagName];
       }
     } else {
-      String experiments = arguments.firstWhere(
-        (e) => e.startsWith('--enable-experiment'),
+      // In the case where a command uses ArgParser.allowAnything() as its
+      // parser the valid set of options for the command isn't specified and
+      // isn't enforced. Instead, we have to manually parse the arguments to
+      // look for --enable-experiment=. Currently, this path is only taken for
+      // the pub and test commands, as well as when we are trying to send
+      // analytics.
+      final String experiments = arguments.firstWhere(
+        (e) => e.startsWith('--enable-experiment='),
         orElse: () => null,
       );
       if (experiments == null) {
diff --git a/pkg/dds/CHANGELOG.md b/pkg/dds/CHANGELOG.md
index f959b95..32be6a6 100644
--- a/pkg/dds/CHANGELOG.md
+++ b/pkg/dds/CHANGELOG.md
@@ -1,3 +1,8 @@
+# 1.5.0
+- Added event caching for `Stdout`, `Stderr`, and `Extension` streams. When a
+client subscribes to one of these streams, they will be sent up to 10,000
+historical events from the stream.
+
 # 1.4.1
 - Fixed issue where `evaluate` and `evaluateInFrame` requests were not being
   forwarded to the VM service properly when no external compilation service
diff --git a/pkg/dds/dds_protocol.md b/pkg/dds/dds_protocol.md
index be9da7e..253ef99 100644
--- a/pkg/dds/dds_protocol.md
+++ b/pkg/dds/dds_protocol.md
@@ -47,6 +47,22 @@
 
 See the corresponding section in the VM Service protocol [here][service-protocol-ids-and-names].
 
+## Streams
+
+For a list of core VM service streams, see [streamListen][service-protocol-streams].
+
+DDS will keep a history of events on certain streams and send historical events
+when a client first subscribes to a stream with history. These streams currently
+consist of the following:
+
+- `Logging`
+- `Stdout`
+- `Stderr`
+- `Extension`
+
+In addition, subscribing to the `Service` stream will result in a `ServiceRegistered`
+event being sent to the subscribing client for each existing service extension.
+
 ## Public RPCs
 
 The DDS Protocol supports all [public RPCs defined in the VM Service protocol][service-protocol-public-rpcs].
@@ -187,6 +203,7 @@
 [service-protocol]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md
 [service-protocol-rpcs-requests-and-responses]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#rpcs-requests-and-responses
 [service-protocol-events]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#events
+[service-protocol-streams]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#streamlisten
 [service-protocol-binary-events]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#binary-events
 [service-protocol-types]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#types
 [service-protocol-ids-and-names]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#ids-and-names
diff --git a/pkg/dds/lib/src/client.dart b/pkg/dds/lib/src/client.dart
index 79e4233..2c85aae 100644
--- a/pkg/dds/lib/src/client.dart
+++ b/pkg/dds/lib/src/client.dart
@@ -140,7 +140,9 @@
         'getLogHistorySize',
         (parameters) => {
               'type': 'Size',
-              'size': dds.loggingRepository.bufferSize,
+              'size': _StreamManager
+                  .loggingRepositories[_StreamManager.kLoggingStream]
+                  .bufferSize,
             });
 
     _clientPeer.registerMethod('setLogHistorySize', (parameters) {
@@ -150,7 +152,8 @@
           "'size' must be greater or equal to zero",
         );
       }
-      dds.loggingRepository.resize(size);
+      _StreamManager.loggingRepositories[_StreamManager.kLoggingStream]
+          .resize(size);
       return _RPCResponses.success;
     });
 
diff --git a/pkg/dds/lib/src/dds_impl.dart b/pkg/dds/lib/src/dds_impl.dart
index 06327a8..d2a6dcb 100644
--- a/pkg/dds/lib/src/dds_impl.dart
+++ b/pkg/dds/lib/src/dds_impl.dart
@@ -10,7 +10,6 @@
     _clientManager = _ClientManager(this);
     _expressionEvaluator = _ExpressionEvaluator(this);
     _isolateManager = _IsolateManager(this);
-    _loggingRepository = _LoggingRepository();
     _streamManager = _StreamManager(this);
     _authCode = _authCodesEnabled ? _makeAuthToken() : '';
   }
@@ -270,9 +269,6 @@
   _IsolateManager get isolateManager => _isolateManager;
   _IsolateManager _isolateManager;
 
-  _LoggingRepository get loggingRepository => _loggingRepository;
-  _LoggingRepository _loggingRepository;
-
   _StreamManager get streamManager => _streamManager;
   _StreamManager _streamManager;
 
diff --git a/pkg/dds/lib/src/stream_manager.dart b/pkg/dds/lib/src/stream_manager.dart
index abb233c..542fe91 100644
--- a/pkg/dds/lib/src/stream_manager.dart
+++ b/pkg/dds/lib/src/stream_manager.dart
@@ -91,7 +91,14 @@
     // The _IsolateManager requires information from both the Debug and
     // Isolate streams, so they must always be subscribed to by DDS.
     for (final stream in ddsCoreStreams) {
-      await streamListen(null, stream);
+      try {
+        await streamListen(null, stream);
+        if (loggingRepositoryStreams.contains(stream)) {
+          loggingRepositories[stream] = _LoggingRepository();
+        }
+      } on json_rpc.RpcException {
+        // Stdout and Stderr streams may not exist.
+      }
     }
     dds._vmServiceClient.registerMethod(
       'streamNotify',
@@ -101,10 +108,10 @@
         if (isolateManagerStreams.contains(streamId)) {
           dds.isolateManager.handleIsolateEvent(parameters);
         }
-        // Keep a history of log messages to send to clients when they first
-        // subscribe to the Logging stream.
-        if (streamId == kLoggingStream) {
-          dds.loggingRepository.add(parameters.asMap);
+        // Keep a history of messages to send to clients when they first
+        // subscribe to a stream with an event history.
+        if (loggingRepositories.containsKey(streamId)) {
+          loggingRepositories[streamId].add(parameters.asMap);
         }
         streamNotify(streamId, parameters.value);
       },
@@ -137,8 +144,8 @@
     }
     if (client != null) {
       streamListeners[stream].add(client);
-      if (stream == kLoggingStream) {
-        dds.loggingRepository.sendHistoricalLogs(client);
+      if (loggingRepositories.containsKey(stream)) {
+        loggingRepositories[stream].sendHistoricalLogs(client);
       } else if (stream == kServiceStream) {
         // Send all previously registered service extensions when a client
         // subscribes to the Service stream.
@@ -223,8 +230,13 @@
   );
 
   static const kDebugStream = 'Debug';
+  static const kExtensionStream = 'Extension';
   static const kIsolateStream = 'Isolate';
   static const kLoggingStream = 'Logging';
+  static const kStderrStream = 'Stderr';
+  static const kStdoutStream = 'Stdout';
+
+  static Map<String, _LoggingRepository> loggingRepositories = {};
 
   // Never cancel the Debug or Isolate stream as `_IsolateManager` requires
   // them for isolate state notifications.
@@ -233,10 +245,13 @@
     kIsolateStream,
   };
 
-  // Never cancel the Logging stream as `_LoggingRepository` requires it to
-  // keep a log history.
+  // Never cancel the logging and extension event streams as `_LoggingRepository`
+  // requires them keep history.
   static const loggingRepositoryStreams = <String>{
+    kExtensionStream,
     kLoggingStream,
+    kStderrStream,
+    kStdoutStream,
   };
 
   // The set of streams that DDS requires to function.
diff --git a/pkg/dds/pubspec.yaml b/pkg/dds/pubspec.yaml
index a7ae669..d2fdbdb 100644
--- a/pkg/dds/pubspec.yaml
+++ b/pkg/dds/pubspec.yaml
@@ -3,7 +3,7 @@
   A library used to spawn the Dart Developer Service, used to communicate with
   a Dart VM Service instance.
 
-version: 1.4.1
+version: 1.5.0
 
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/dds
 
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart b/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart
index ecc1198..64581cc 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart
@@ -242,6 +242,73 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
+    templateArgumentTypeNotAssignableNullabilityNull = const Template<
+            Message Function(DartType _type, bool isNonNullableByDefault)>(
+        messageTemplate:
+            r"""The value 'null' can't be assigned to the parameter type '#type' because '#type' is not nullable.""",
+        withArguments: _withArgumentsArgumentTypeNotAssignableNullabilityNull);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(DartType _type, bool isNonNullableByDefault)>
+    codeArgumentTypeNotAssignableNullabilityNull =
+    const Code<Message Function(DartType _type, bool isNonNullableByDefault)>(
+        "ArgumentTypeNotAssignableNullabilityNull",
+        templateArgumentTypeNotAssignableNullabilityNull,
+        analyzerCodes: <String>["ARGUMENT_TYPE_NOT_ASSIGNABLE"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsArgumentTypeNotAssignableNullabilityNull(
+    DartType _type, bool isNonNullableByDefault) {
+  TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+  List<Object> typeParts = labeler.labelType(_type);
+  String type = typeParts.join();
+  return new Message(codeArgumentTypeNotAssignableNullabilityNull,
+      message:
+          """The value 'null' can't be assigned to the parameter type '${type}' because '${type}' is not nullable.""" +
+              labeler.originMessages,
+      arguments: {'type': _type});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>
+    templateArgumentTypeNotAssignableNullabilityNullType = const Template<
+            Message Function(
+                DartType _type, DartType _type2, bool isNonNullableByDefault)>(
+        messageTemplate:
+            r"""The argument type '#type' can't be assigned to the parameter type '#type2' because '#type2' is not nullable.""",
+        withArguments:
+            _withArgumentsArgumentTypeNotAssignableNullabilityNullType);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>
+    codeArgumentTypeNotAssignableNullabilityNullType = const Code<
+            Message Function(
+                DartType _type, DartType _type2, bool isNonNullableByDefault)>(
+        "ArgumentTypeNotAssignableNullabilityNullType",
+        templateArgumentTypeNotAssignableNullabilityNullType,
+        analyzerCodes: <String>["ARGUMENT_TYPE_NOT_ASSIGNABLE"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsArgumentTypeNotAssignableNullabilityNullType(
+    DartType _type, DartType _type2, bool isNonNullableByDefault) {
+  TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+  List<Object> typeParts = labeler.labelType(_type);
+  List<Object> type2Parts = labeler.labelType(_type2);
+  String type = typeParts.join();
+  String type2 = type2Parts.join();
+  return new Message(codeArgumentTypeNotAssignableNullabilityNullType,
+      message:
+          """The argument type '${type}' can't be assigned to the parameter type '${type2}' because '${type2}' is not nullable.""" +
+              labeler.originMessages,
+      arguments: {'type': _type, 'type2': _type2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
         Message Function(DartType _type, DartType _type2, DartType _type3,
             DartType _type4, bool isNonNullableByDefault)>
@@ -1978,6 +2045,72 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
+    templateInvalidAssignmentErrorNullabilityNull = const Template<
+            Message Function(DartType _type, bool isNonNullableByDefault)>(
+        messageTemplate:
+            r"""The value 'null' can't be assigned to a variable of type '#type' because '#type' is not nullable.""",
+        withArguments: _withArgumentsInvalidAssignmentErrorNullabilityNull);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(DartType _type, bool isNonNullableByDefault)>
+    codeInvalidAssignmentErrorNullabilityNull =
+    const Code<Message Function(DartType _type, bool isNonNullableByDefault)>(
+        "InvalidAssignmentErrorNullabilityNull",
+        templateInvalidAssignmentErrorNullabilityNull,
+        analyzerCodes: <String>["INVALID_ASSIGNMENT"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidAssignmentErrorNullabilityNull(
+    DartType _type, bool isNonNullableByDefault) {
+  TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+  List<Object> typeParts = labeler.labelType(_type);
+  String type = typeParts.join();
+  return new Message(codeInvalidAssignmentErrorNullabilityNull,
+      message:
+          """The value 'null' can't be assigned to a variable of type '${type}' because '${type}' is not nullable.""" +
+              labeler.originMessages,
+      arguments: {'type': _type});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>
+    templateInvalidAssignmentErrorNullabilityNullType = const Template<
+            Message Function(
+                DartType _type, DartType _type2, bool isNonNullableByDefault)>(
+        messageTemplate:
+            r"""A value of type '#type' can't be assigned to a variable of type '#type2' because '#type2' is not nullable.""",
+        withArguments: _withArgumentsInvalidAssignmentErrorNullabilityNullType);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>
+    codeInvalidAssignmentErrorNullabilityNullType = const Code<
+            Message Function(
+                DartType _type, DartType _type2, bool isNonNullableByDefault)>(
+        "InvalidAssignmentErrorNullabilityNullType",
+        templateInvalidAssignmentErrorNullabilityNullType,
+        analyzerCodes: <String>["INVALID_ASSIGNMENT"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidAssignmentErrorNullabilityNullType(
+    DartType _type, DartType _type2, bool isNonNullableByDefault) {
+  TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+  List<Object> typeParts = labeler.labelType(_type);
+  List<Object> type2Parts = labeler.labelType(_type2);
+  String type = typeParts.join();
+  String type2 = type2Parts.join();
+  return new Message(codeInvalidAssignmentErrorNullabilityNullType,
+      message:
+          """A value of type '${type}' can't be assigned to a variable of type '${type2}' because '${type2}' is not nullable.""" +
+              labeler.originMessages,
+      arguments: {'type': _type, 'type2': _type2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
         Message Function(DartType _type, DartType _type2, DartType _type3,
             DartType _type4, bool isNonNullableByDefault)>
@@ -3168,6 +3301,72 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
+    templateInvalidReturnAsyncNullabilityNull = const Template<
+            Message Function(DartType _type, bool isNonNullableByDefault)>(
+        messageTemplate:
+            r"""The value 'null' can't be returned from an async function with return type '#type' because '#type' is not nullable.""",
+        withArguments: _withArgumentsInvalidReturnAsyncNullabilityNull);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(DartType _type, bool isNonNullableByDefault)>
+    codeInvalidReturnAsyncNullabilityNull =
+    const Code<Message Function(DartType _type, bool isNonNullableByDefault)>(
+  "InvalidReturnAsyncNullabilityNull",
+  templateInvalidReturnAsyncNullabilityNull,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidReturnAsyncNullabilityNull(
+    DartType _type, bool isNonNullableByDefault) {
+  TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+  List<Object> typeParts = labeler.labelType(_type);
+  String type = typeParts.join();
+  return new Message(codeInvalidReturnAsyncNullabilityNull,
+      message:
+          """The value 'null' can't be returned from an async function with return type '${type}' because '${type}' is not nullable.""" +
+              labeler.originMessages,
+      arguments: {'type': _type});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>
+    templateInvalidReturnAsyncNullabilityNullType = const Template<
+            Message Function(
+                DartType _type, DartType _type2, bool isNonNullableByDefault)>(
+        messageTemplate:
+            r"""A value of type '#type' can't be returned from an async function with return type '#type2' because '#type2' is not nullable.""",
+        withArguments: _withArgumentsInvalidReturnAsyncNullabilityNullType);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>
+    codeInvalidReturnAsyncNullabilityNullType = const Code<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>(
+  "InvalidReturnAsyncNullabilityNullType",
+  templateInvalidReturnAsyncNullabilityNullType,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidReturnAsyncNullabilityNullType(
+    DartType _type, DartType _type2, bool isNonNullableByDefault) {
+  TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+  List<Object> typeParts = labeler.labelType(_type);
+  List<Object> type2Parts = labeler.labelType(_type2);
+  String type = typeParts.join();
+  String type2 = type2Parts.join();
+  return new Message(codeInvalidReturnAsyncNullabilityNullType,
+      message:
+          """A value of type '${type}' can't be returned from an async function with return type '${type2}' because '${type2}' is not nullable.""" +
+              labeler.originMessages,
+      arguments: {'type': _type, 'type2': _type2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
         Message Function(DartType _type, DartType _type2, DartType _type3,
             DartType _type4, bool isNonNullableByDefault)>
@@ -3255,6 +3454,72 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
+    templateInvalidReturnNullabilityNull = const Template<
+            Message Function(DartType _type, bool isNonNullableByDefault)>(
+        messageTemplate:
+            r"""The value 'null' can't be returned from a function with return type '#type' because '#type' is not nullable.""",
+        withArguments: _withArgumentsInvalidReturnNullabilityNull);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(DartType _type, bool isNonNullableByDefault)>
+    codeInvalidReturnNullabilityNull =
+    const Code<Message Function(DartType _type, bool isNonNullableByDefault)>(
+  "InvalidReturnNullabilityNull",
+  templateInvalidReturnNullabilityNull,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidReturnNullabilityNull(
+    DartType _type, bool isNonNullableByDefault) {
+  TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+  List<Object> typeParts = labeler.labelType(_type);
+  String type = typeParts.join();
+  return new Message(codeInvalidReturnNullabilityNull,
+      message:
+          """The value 'null' can't be returned from a function with return type '${type}' because '${type}' is not nullable.""" +
+              labeler.originMessages,
+      arguments: {'type': _type});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>
+    templateInvalidReturnNullabilityNullType = const Template<
+            Message Function(
+                DartType _type, DartType _type2, bool isNonNullableByDefault)>(
+        messageTemplate:
+            r"""A value of type '#type' can't be returned from a function with return type '#type2' because '#type2' is not nullable.""",
+        withArguments: _withArgumentsInvalidReturnNullabilityNullType);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>
+    codeInvalidReturnNullabilityNullType = const Code<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>(
+  "InvalidReturnNullabilityNullType",
+  templateInvalidReturnNullabilityNullType,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidReturnNullabilityNullType(
+    DartType _type, DartType _type2, bool isNonNullableByDefault) {
+  TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+  List<Object> typeParts = labeler.labelType(_type);
+  List<Object> type2Parts = labeler.labelType(_type2);
+  String type = typeParts.join();
+  String type2 = type2Parts.join();
+  return new Message(codeInvalidReturnNullabilityNullType,
+      message:
+          """A value of type '${type}' can't be returned from a function with return type '${type2}' because '${type2}' is not nullable.""" +
+              labeler.originMessages,
+      arguments: {'type': _type, 'type2': _type2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
         Message Function(DartType _type, DartType _type2, DartType _type3,
             DartType _type4, bool isNonNullableByDefault)>
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index a4eebe8..d65d47e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -507,7 +507,9 @@
   }
 
   Statement popBlock(int count, Token openBrace, Token closeBrace) {
-    return forest.createBlock(offsetForToken(openBrace),
+    return forest.createBlock(
+        offsetForToken(openBrace),
+        offsetForToken(closeBrace),
         const GrowableList<Statement>().pop(stack, count) ?? <Statement>[]);
   }
 
@@ -1015,9 +1017,9 @@
             statements.add(parameter.variable);
           }
           statements.add(body);
-          body = forest.createBlock(charOffset, statements);
+          body = forest.createBlock(charOffset, noLocation, statements);
         }
-        body = forest.createBlock(charOffset, <Statement>[
+        body = forest.createBlock(charOffset, noLocation, <Statement>[
           forest.createExpressionStatement(
               noLocation,
               // This error is added after type inference is done, so we
@@ -3777,7 +3779,7 @@
     if (compileTimeErrors == null) {
       push(NullValue.Block);
     } else {
-      push(forest.createBlock(noLocation, compileTimeErrors));
+      push(forest.createBlock(noLocation, noLocation, compileTimeErrors));
     }
   }
 
@@ -3824,7 +3826,7 @@
 
     if (compileTimeErrors != null) {
       compileTimeErrors.add(result);
-      push(forest.createBlock(noLocation, compileTimeErrors));
+      push(forest.createBlock(noLocation, noLocation, compileTimeErrors));
     } else {
       push(result);
     }
@@ -4919,7 +4921,8 @@
           // This must have been a compile-time error.
           assert(isErroneousNode(variable.initializer));
 
-          push(forest.createBlock(declaration.fileOffset, <Statement>[
+          push(forest
+              .createBlock(declaration.fileOffset, noLocation, <Statement>[
             forest.createExpressionStatement(
                 offsetForToken(token), variable.initializer),
             declaration
@@ -5157,6 +5160,7 @@
         if (forest.isVariablesDeclaration(lvalue)) {
           effects = forest.createBlock(
               noLocation,
+              noLocation,
               // New list because the declarations are not a growable list.
               new List<Statement>.from(
                   forest.variablesDeclarationExtractDeclarations(lvalue)));
@@ -6083,7 +6087,7 @@
     if (member.isNative) {
       push(NullValue.FunctionBody);
     } else {
-      push(forest.createBlock(offsetForToken(token), <Statement>[
+      push(forest.createBlock(offsetForToken(token), noLocation, <Statement>[
         buildProblemStatement(
             fasta.templateExpectedFunctionBody.withArguments(token),
             token.charOffset,
diff --git a/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart b/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart
index ea003a5..f89b4e8 100644
--- a/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart
@@ -582,18 +582,22 @@
       NamedType namedType = functionType.namedParameters.first;
       VariableDeclaration parameter = function.namedParameters.first;
       namedParameters.add(new VariableDeclaration(parameter.name,
-          type: namedType.type, isCovariant: parameter.isCovariant)
+          type: namedType.type,
+          isRequired: namedType.isRequired,
+          isCovariant: parameter.isCovariant)
         ..isGenericCovariantImpl = parameter.isGenericCovariantImpl);
     } else if (namedParameterCount > 1) {
-      Map<String, DartType> namedTypes = {};
+      Map<String, NamedType> namedTypes = {};
       for (NamedType namedType in functionType.namedParameters) {
-        namedTypes[namedType.name] = namedType.type;
+        namedTypes[namedType.name] = namedType;
       }
       for (int i = 0; i < namedParameterCount; i++) {
         VariableDeclaration parameter = function.namedParameters[i];
-        DartType parameterType = namedTypes[parameter.name];
+        NamedType namedParameterType = namedTypes[parameter.name];
         namedParameters.add(new VariableDeclaration(parameter.name,
-            type: parameterType, isCovariant: parameter.isCovariant)
+            type: namedParameterType.type,
+            isRequired: namedParameterType.isRequired,
+            isCovariant: parameter.isCovariant)
           ..isGenericCovariantImpl = parameter.isGenericCovariantImpl);
       }
     }
diff --git a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
index 58a0b19..bca4392 100644
--- a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
@@ -1770,7 +1770,9 @@
       return unevaluated(
           node,
           new MethodInvocation(extract(receiver), node.name,
-              unevaluatedArguments(arguments, {}, node.arguments.types)));
+              unevaluatedArguments(arguments, {}, node.arguments.types))
+            ..fileOffset = node.fileOffset
+            ..flags = node.flags);
     }
 
     final String op = node.name.text;
diff --git a/pkg/front_end/lib/src/fasta/kernel/forest.dart b/pkg/front_end/lib/src/fasta/kernel/forest.dart
index b683259..273a4e7 100644
--- a/pkg/front_end/lib/src/fasta/kernel/forest.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/forest.dart
@@ -311,7 +311,8 @@
 
   /// Return a representation of a block of [statements] at the given
   /// [fileOffset].
-  Statement createBlock(int fileOffset, List<Statement> statements) {
+  Statement createBlock(
+      int fileOffset, int fileEndOffset, List<Statement> statements) {
     assert(fileOffset != null);
     List<Statement> copy;
     for (int i = 0; i < statements.length; i++) {
@@ -323,7 +324,9 @@
         copy.add(statement);
       }
     }
-    return new Block(copy ?? statements)..fileOffset = fileOffset;
+    return new Block(copy ?? statements)
+      ..fileOffset = fileOffset
+      ..fileEndOffset = fileEndOffset;
   }
 
   /// Return a representation of a break statement.
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 2d14e54..f64bdf2 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -3742,7 +3742,11 @@
         errorTemplate: templateArgumentTypeNotAssignable,
         nullabilityErrorTemplate: templateArgumentTypeNotAssignableNullability,
         nullabilityPartErrorTemplate:
-            templateArgumentTypeNotAssignablePartNullability);
+            templateArgumentTypeNotAssignablePartNullability,
+        nullabilityNullErrorTemplate:
+            templateArgumentTypeNotAssignableNullabilityNull,
+        nullabilityNullTypeErrorTemplate:
+            templateArgumentTypeNotAssignableNullabilityNullType);
 
     Expression equals = new MethodInvocation(
         left,
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 2f0811c..0d758a1 100644
--- a/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
@@ -754,7 +754,8 @@
         "No fileOffset on ${argument}.");
     return new MethodInvocation(receiver, new Name('add'),
         new Arguments([argument]), isSet ? setAdd : listAdd)
-      ..fileOffset = argument.fileOffset;
+      ..fileOffset = argument.fileOffset
+      ..isInvariant = true;
   }
 
   Expression _createEqualsNull(Expression expression, {bool notEquals: false}) {
@@ -778,7 +779,8 @@
     assert(fileOffset != TreeNode.noOffset);
     return new MethodInvocation(
         receiver, new Name('[]='), new Arguments([key, value]), mapPut)
-      ..fileOffset = fileOffset;
+      ..fileOffset = fileOffset
+      ..isInvariant = true;
   }
 
   AsExpression _createImplicitAs(
diff --git a/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart b/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart
index ea13c05..67f0898 100644
--- a/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart
@@ -79,7 +79,8 @@
           new Name("add"),
           new Arguments([entry]),
           addMethod)
-        ..fileOffset = entry.fileOffset;
+        ..fileOffset = entry.fileOffset
+        ..isInvariant = true;
       statements.add(new ExpressionStatement(methodInvocation)
         ..fileOffset = methodInvocation.fileOffset);
     }
diff --git a/pkg/front_end/lib/src/fasta/type_inference/closure_context.dart b/pkg/front_end/lib/src/fasta/type_inference/closure_context.dart
index b646152..4de8315 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/closure_context.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/closure_context.dart
@@ -202,7 +202,11 @@
               errorTemplate: templateInvalidReturn,
               nullabilityErrorTemplate: templateInvalidReturnNullability,
               nullabilityPartErrorTemplate:
-                  templateInvalidReturnPartNullability);
+                  templateInvalidReturnPartNullability,
+              nullabilityNullErrorTemplate:
+                  templateInvalidReturnNullabilityNull,
+              nullabilityNullTypeErrorTemplate:
+                  templateInvalidReturnNullabilityNullType);
           statement.expression = expression..parent = statement;
         }
       }
@@ -558,7 +562,11 @@
               errorTemplate: templateInvalidReturnAsync,
               nullabilityErrorTemplate: templateInvalidReturnAsyncNullability,
               nullabilityPartErrorTemplate:
-                  templateInvalidReturnAsyncPartNullability)
+                  templateInvalidReturnAsyncPartNullability,
+              nullabilityNullErrorTemplate:
+                  templateInvalidReturnAsyncNullabilityNull,
+              nullabilityNullTypeErrorTemplate:
+                  templateInvalidReturnAsyncNullabilityNullType)
             ..parent = statement;
         }
       }
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
index 682b6ef..d9c7b80 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
@@ -395,6 +395,9 @@
       Template<Message Function(DartType, DartType, bool)> errorTemplate,
       Template<Message Function(DartType, DartType, bool)>
           nullabilityErrorTemplate,
+      Template<Message Function(DartType, bool)> nullabilityNullErrorTemplate,
+      Template<Message Function(DartType, DartType, bool)>
+          nullabilityNullTypeErrorTemplate,
       Template<Message Function(DartType, DartType, DartType, DartType, bool)>
           nullabilityPartErrorTemplate}) {
     return ensureAssignable(
@@ -403,6 +406,8 @@
         isVoidAllowed: isVoidAllowed,
         errorTemplate: errorTemplate,
         nullabilityErrorTemplate: nullabilityErrorTemplate,
+        nullabilityNullErrorTemplate: nullabilityNullErrorTemplate,
+        nullabilityNullTypeErrorTemplate: nullabilityNullTypeErrorTemplate,
         nullabilityPartErrorTemplate: nullabilityPartErrorTemplate);
   }
 
@@ -433,6 +438,9 @@
       Template<Message Function(DartType, DartType, bool)> errorTemplate,
       Template<Message Function(DartType, DartType, bool)>
           nullabilityErrorTemplate,
+      Template<Message Function(DartType, bool)> nullabilityNullErrorTemplate,
+      Template<Message Function(DartType, DartType, bool)>
+          nullabilityNullTypeErrorTemplate,
       Template<Message Function(DartType, DartType, DartType, DartType, bool)>
           nullabilityPartErrorTemplate}) {
     assert(contextType != null);
@@ -442,7 +450,19 @@
     assert((errorTemplate == null) == (nullabilityErrorTemplate == null) &&
         (nullabilityErrorTemplate == null) ==
             (nullabilityPartErrorTemplate == null));
+    // [nullabilityNullErrorTemplate] and [nullabilityNullTypeErrorTemplate]
+    // should be provided together.
+    assert((nullabilityNullErrorTemplate == null) ==
+        (nullabilityNullTypeErrorTemplate == null));
     errorTemplate ??= templateInvalidAssignmentError;
+    if (nullabilityErrorTemplate == null) {
+      // Use [templateInvalidAssignmentErrorNullabilityNull] only if no
+      // specific [nullabilityErrorTemplate] template was passed.
+      nullabilityNullErrorTemplate ??=
+          templateInvalidAssignmentErrorNullabilityNull;
+    }
+    nullabilityNullTypeErrorTemplate ??= nullabilityErrorTemplate ??
+        templateInvalidAssignmentErrorNullabilityNullType;
     nullabilityErrorTemplate ??= templateInvalidAssignmentErrorNullability;
     nullabilityPartErrorTemplate ??=
         templateInvalidAssignmentErrorPartNullability;
@@ -532,12 +552,34 @@
       case AssignabilityKind.unassignableNullability:
         if (expressionType == assignabilityResult.subtype &&
             contextType == assignabilityResult.supertype) {
-          result = _wrapUnassignableExpression(
-              expression,
-              expressionType,
-              contextType,
-              nullabilityErrorTemplate.withArguments(expressionType,
-                  declaredContextType ?? contextType, isNonNullableByDefault));
+          if (expression is NullLiteral &&
+              nullabilityNullErrorTemplate != null) {
+            result = _wrapUnassignableExpression(
+                expression,
+                expressionType,
+                contextType,
+                nullabilityNullErrorTemplate.withArguments(
+                    declaredContextType ?? contextType,
+                    isNonNullableByDefault));
+          } else if (expressionType is NullType) {
+            result = _wrapUnassignableExpression(
+                expression,
+                expressionType,
+                contextType,
+                nullabilityNullTypeErrorTemplate.withArguments(
+                    expressionType,
+                    declaredContextType ?? contextType,
+                    isNonNullableByDefault));
+          } else {
+            result = _wrapUnassignableExpression(
+                expression,
+                expressionType,
+                contextType,
+                nullabilityErrorTemplate.withArguments(
+                    expressionType,
+                    declaredContextType ?? contextType,
+                    isNonNullableByDefault));
+          }
         } else {
           result = _wrapUnassignableExpression(
               expression,
@@ -2130,7 +2172,11 @@
               nullabilityErrorTemplate:
                   templateArgumentTypeNotAssignableNullability,
               nullabilityPartErrorTemplate:
-                  templateArgumentTypeNotAssignablePartNullability);
+                  templateArgumentTypeNotAssignablePartNullability,
+              nullabilityNullErrorTemplate:
+                  templateArgumentTypeNotAssignableNullabilityNull,
+              nullabilityNullTypeErrorTemplate:
+                  templateArgumentTypeNotAssignableNullabilityNullType);
           if (namedExpression == null) {
             arguments.positional[positionalShift + i] = expression
               ..parent = arguments;
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index 329faa1..2fe29ec 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -450,8 +450,12 @@
 InvalidReturn/analyzerCode: Fail
 InvalidReturnAsync/analyzerCode: Fail
 InvalidReturnAsyncNullability/analyzerCode: Fail
+InvalidReturnAsyncNullabilityNull/analyzerCode: Fail
+InvalidReturnAsyncNullabilityNullType/analyzerCode: Fail
 InvalidReturnAsyncPartNullability/analyzerCode: Fail
 InvalidReturnNullability/analyzerCode: Fail
+InvalidReturnNullabilityNull/analyzerCode: Fail
+InvalidReturnNullabilityNullType/analyzerCode: Fail
 InvalidReturnPartNullability/analyzerCode: Fail
 InvalidSuperInInitializer/example: Fail
 InvalidThisInInitializer/example: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index dea2312..4e6e901 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -3318,6 +3318,27 @@
       method(j);
     }
 
+ArgumentTypeNotAssignableNullabilityNull:
+  template: "The value 'null' can't be assigned to the parameter type '#type' because '#type' is not nullable."
+  analyzerCode: ARGUMENT_TYPE_NOT_ASSIGNABLE
+  configuration: nnbd-strong
+  script: >
+    method(int i) {}
+    main() {
+      method(null);
+    }
+
+ArgumentTypeNotAssignableNullabilityNullType:
+  template: "The argument type '#type' can't be assigned to the parameter type '#type2' because '#type2' is not nullable."
+  analyzerCode: ARGUMENT_TYPE_NOT_ASSIGNABLE
+  configuration: nnbd-strong
+  script: >
+    method(int i) {}
+    main() {
+      Null n;
+      method(n);
+    }
+
 InvalidAssignmentError:
   template: "A value of type '#type' can't be assigned to a variable of type '#type2'."
   analyzerCode: INVALID_ASSIGNMENT
@@ -3349,6 +3370,27 @@
       i = j;
     }
 
+InvalidAssignmentErrorNullabilityNull:
+  template: "The value 'null' can't be assigned to a variable of type '#type' because '#type' is not nullable."
+  analyzerCode: INVALID_ASSIGNMENT
+  configuration: nnbd-strong
+  script: >
+    main() {
+      int i = 0;
+      i = null;
+    }
+
+InvalidAssignmentErrorNullabilityNullType:
+  template: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type2' is not nullable."
+  analyzerCode: INVALID_ASSIGNMENT
+  configuration: nnbd-strong
+  script: >
+    main() {
+      Null n;
+      int i = 0;
+      i = n;
+    }
+
 PatchClassTypeVariablesMismatch:
   template: "A patch class must have the same number of type variables as its origin class."
 
@@ -3882,6 +3924,16 @@
   configuration: nnbd-strong
   declaration: "List<int> foo(List<int?> list) { return list; }"
 
+InvalidReturnNullabilityNull:
+  template: "The value 'null' can't be returned from a function with return type '#type' because '#type' is not nullable."
+  configuration: nnbd-strong
+  declaration: "int foo() { return null; }"
+
+InvalidReturnNullabilityNullType:
+  template: "A value of type '#type' can't be returned from a function with return type '#type2' because '#type2' is not nullable."
+  configuration: nnbd-strong
+  declaration: "int foo(Null i) { return i; }"
+
 InvalidReturnAsync:
   template: "A value of type '#type' can't be returned from an async function with return type '#type2'."
   configuration: nnbd-strong
@@ -3897,6 +3949,16 @@
   configuration: nnbd-strong
   declaration: "Future<List<int>> foo(List<int?> list) async { return list; }"
 
+InvalidReturnAsyncNullabilityNull:
+  template: "The value 'null' can't be returned from an async function with return type '#type' because '#type' is not nullable."
+  configuration: nnbd-strong
+  declaration: "Future<int> foo() async { return null; }"
+
+InvalidReturnAsyncNullabilityNullType:
+  template: "A value of type '#type' can't be returned from an async function with return type '#type2' because '#type2' is not nullable."
+  configuration: nnbd-strong
+  declaration: "Future<int> foo(Null n) async { return n; }"
+
 ImplicitReturnNull:
   template: "A non-null value must be returned since the return type '#type' doesn't allow null."
   configuration: nnbd-strong
diff --git a/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart b/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart
index 0f771da..cf9cfa5 100644
--- a/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart
+++ b/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart
@@ -44,11 +44,11 @@
         await context.options.getUriTranslator(),
         new NoneTarget(new TargetFlags()));
     final DillLoader loader = target.loader;
-    loader.appendLibraries(component);
+    loader.appendLibraries(env.component);
     await target.buildOutlines();
     ClassBuilder objectClass =
         loader.coreLibrary.lookupLocalMember("Object", required: true);
-    hierarchy = new ClassHierarchyBuilder(objectClass, loader, coreTypes);
+    hierarchy = new ClassHierarchyBuilder(objectClass, loader, env.coreTypes);
   }
 
   @override
diff --git a/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart b/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart
index 152d8d6..0409fcb 100644
--- a/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart
+++ b/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart
@@ -14,7 +14,7 @@
   @override
   Future<void> parseComponent(String source) {
     super.parseComponent(source);
-    hierarchy = new ClassHierarchy(component, coreTypes);
+    hierarchy = new ClassHierarchy(env.component, env.coreTypes);
     return null;
   }
 
diff --git a/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart b/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart
index d316988..f55fe0a 100644
--- a/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart
+++ b/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart
@@ -6,58 +6,49 @@
 
 import "package:expect/expect.dart" show Expect;
 
-import "package:kernel/ast.dart"
-    show Class, Component, DartType, InterfaceType, Library, Nullability;
+import "package:kernel/ast.dart";
 
-import "package:kernel/core_types.dart";
-
-import "package:kernel/library_index.dart" show LibraryIndex;
-
-import 'package:kernel/testing/type_parser_environment.dart'
-    as kernel_type_parser show parseComponent;
+import 'package:kernel/testing/type_parser_environment.dart' as parser;
 
 final Uri libraryUri = Uri.parse("org-dartlang-test:///library.dart");
 
 abstract class LegacyUpperBoundTest {
-  Component component;
-
-  CoreTypes coreTypes;
-
-  LibraryIndex index;
-
-  DartType get objectType => coreTypes.objectLegacyRawType;
-
-  DartType get intType => coreTypes.intLegacyRawType;
-
-  DartType get stringType => coreTypes.intLegacyRawType;
-
-  DartType get doubleType => coreTypes.doubleLegacyRawType;
-
-  DartType get boolType => coreTypes.boolLegacyRawType;
+  parser.Env env;
+  Library coreLibrary;
+  Library testLibrary;
 
   void parseComponent(String source) {
-    component = kernel_type_parser.parseComponent(source, libraryUri);
-    coreTypes = new CoreTypes(component);
-    index = new LibraryIndex.all(component);
-  }
-
-  Class getClass(String name) {
-    return index.getClass("$libraryUri", name);
-  }
-
-  Class getCoreClass(String name) {
-    return index.getClass("dart:core", name);
+    env = new parser.Env(source);
+    assert(
+        env.component.libraries.length == 2,
+        "The test component is expected to have exactly two libraries: "
+        "the core library and the test library.");
+    Library firstLibrary = env.component.libraries.first;
+    Library secondLibrary = env.component.libraries.last;
+    if (firstLibrary.importUri.scheme == "dart" &&
+        firstLibrary.importUri.path == "core") {
+      coreLibrary = firstLibrary;
+      testLibrary = secondLibrary;
+    } else {
+      coreLibrary = secondLibrary;
+      testLibrary = firstLibrary;
+    }
   }
 
   DartType getLegacyLeastUpperBound(
       DartType a, DartType b, Library clientLibrary);
 
-  void checkGetLegacyLeastUpperBound(
-      DartType a, DartType b, Library clientLibrary, DartType expected) {
+  void checkLegacyUpTypes(
+      DartType a, DartType b, DartType expected, Library clientLibrary) {
     DartType actual = getLegacyLeastUpperBound(a, b, clientLibrary);
     Expect.equals(expected, actual);
   }
 
+  void checkLegacyUp(String type1, String type2, String expectedType) {
+    checkLegacyUpTypes(env.parseType(type1), env.parseType(type2),
+        env.parseType(expectedType), testLibrary);
+  }
+
   Future<void> test() {
     return asyncTest(() async {
       await test_getLegacyLeastUpperBound_expansive();
@@ -74,36 +65,19 @@
 class C2<T> extends N<N<C2<N<C2<T*>*>*>*>*>;
 """);
 
-    Class N = getClass("N");
-    Class C1 = getClass("C1");
-    Class C2 = getClass("C2");
-    Library testLib = N.enclosingLibrary;
-
     // The least upper bound of C1<int> and N<C1<String>> is Object since the
     // supertypes are
     //     {C1<int>, N<N<C1<int>>>, Object} for C1<int> and
     //     {N<C1<String>>, Object} for N<C1<String>> and
     // Object is the most specific type in the intersection of the supertypes.
-    checkGetLegacyLeastUpperBound(
-        new InterfaceType(C1, Nullability.legacy, [intType]),
-        new InterfaceType(N, Nullability.legacy, [
-          new InterfaceType(C1, Nullability.legacy, [stringType])
-        ]),
-        testLib,
-        objectType);
+    checkLegacyUp("C1<int*>*", "N<C1<String*>*>*", "Object*");
 
     // The least upper bound of C2<int> and N<C2<String>> is Object since the
     // supertypes are
     //     {C2<int>, N<N<C2<N<C2<int>>>>>, Object} for C2<int> and
     //     {N<C2<String>>, Object} for N<C2<String>> and
     // Object is the most specific type in the intersection of the supertypes.
-    checkGetLegacyLeastUpperBound(
-        new InterfaceType(C2, Nullability.legacy, [intType]),
-        new InterfaceType(N, Nullability.legacy, [
-          new InterfaceType(C2, Nullability.legacy, [stringType])
-        ]),
-        testLib,
-        objectType);
+    checkLegacyUp("C2<int*>*", "N<C2<String*>*>*", "Object*");
   }
 
   Future<void> test_getLegacyLeastUpperBound_generic() async {
@@ -116,39 +90,12 @@
 class F implements D<int*, bool*>;
 """);
 
-    Class a = getClass("A");
-    Class b = getClass("B");
-    Class c = getClass("C");
-    Class d = getClass("D");
-    Class e = getClass("E");
-    Class f = getClass("F");
-    Library testLib = a.enclosingLibrary;
-
-    checkGetLegacyLeastUpperBound(
-        new InterfaceType(d, Nullability.legacy, [intType, doubleType]),
-        new InterfaceType(d, Nullability.legacy, [intType, doubleType]),
-        testLib,
-        new InterfaceType(d, Nullability.legacy, [intType, doubleType]));
-    checkGetLegacyLeastUpperBound(
-        new InterfaceType(d, Nullability.legacy, [intType, doubleType]),
-        new InterfaceType(d, Nullability.legacy, [intType, boolType]),
-        testLib,
-        new InterfaceType(b, Nullability.legacy, [intType]));
-    checkGetLegacyLeastUpperBound(
-        new InterfaceType(d, Nullability.legacy, [intType, doubleType]),
-        new InterfaceType(d, Nullability.legacy, [boolType, doubleType]),
-        testLib,
-        new InterfaceType(c, Nullability.legacy, [doubleType]));
-    checkGetLegacyLeastUpperBound(
-        new InterfaceType(d, Nullability.legacy, [intType, doubleType]),
-        new InterfaceType(d, Nullability.legacy, [boolType, intType]),
-        testLib,
-        coreTypes.legacyRawType(a));
-    checkGetLegacyLeastUpperBound(
-        coreTypes.legacyRawType(e),
-        coreTypes.legacyRawType(f),
-        testLib,
-        new InterfaceType(b, Nullability.legacy, [intType]));
+    checkLegacyUp(
+        "D<int*, double*>*", "D<int*, double*>*", "D<int*, double*>*");
+    checkLegacyUp("D<int*, double*>*", "D<int*, bool*>*", "B<int*>*");
+    checkLegacyUp("D<int*, double*>*", "D<bool*, double*>*", "C<double*>*");
+    checkLegacyUp("D<int*, double*>*", "D<bool*, int*>*", "A*");
+    checkLegacyUp("E*", "F*", "B<int*>*");
   }
 
   Future<void> test_getLegacyLeastUpperBound_nonGeneric() async {
@@ -164,31 +111,13 @@
 class I implements C, D, E;
 """);
 
-    Class a = getClass("A");
-    Class b = getClass("B");
-    Class c = getClass("C");
-    Class d = getClass("D");
-    Class f = getClass("F");
-    Class g = getClass("G");
-    Class h = getClass("H");
-    Class i = getClass("I");
-    Library testLib = a.enclosingLibrary;
-
-    checkGetLegacyLeastUpperBound(coreTypes.legacyRawType(a),
-        coreTypes.legacyRawType(b), testLib, objectType);
-    checkGetLegacyLeastUpperBound(
-        coreTypes.legacyRawType(a), objectType, testLib, objectType);
-    checkGetLegacyLeastUpperBound(
-        objectType, coreTypes.legacyRawType(b), testLib, objectType);
-    checkGetLegacyLeastUpperBound(coreTypes.legacyRawType(c),
-        coreTypes.legacyRawType(d), testLib, coreTypes.legacyRawType(a));
-    checkGetLegacyLeastUpperBound(coreTypes.legacyRawType(c),
-        coreTypes.legacyRawType(a), testLib, coreTypes.legacyRawType(a));
-    checkGetLegacyLeastUpperBound(coreTypes.legacyRawType(a),
-        coreTypes.legacyRawType(d), testLib, coreTypes.legacyRawType(a));
-    checkGetLegacyLeastUpperBound(coreTypes.legacyRawType(f),
-        coreTypes.legacyRawType(g), testLib, coreTypes.legacyRawType(a));
-    checkGetLegacyLeastUpperBound(coreTypes.legacyRawType(h),
-        coreTypes.legacyRawType(i), testLib, coreTypes.legacyRawType(a));
+    checkLegacyUp("A*", "B*", "Object*");
+    checkLegacyUp("A*", "Object*", "Object*");
+    checkLegacyUp("Object*", "B*", "Object*");
+    checkLegacyUp("C*", "D*", "A*");
+    checkLegacyUp("C*", "A*", "A*");
+    checkLegacyUp("A*", "D*", "A*");
+    checkLegacyUp("F*", "G*", "A*");
+    checkLegacyUp("H*", "I*", "A*");
   }
 }
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index d910513..5fd534d 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -801,6 +801,7 @@
 particularly
 patchup
 path
+patterns
 paulberry
 pay
 payload
diff --git a/pkg/front_end/testcases/expression/set_literal.expression.yaml.expect b/pkg/front_end/testcases/expression/set_literal.expression.yaml.expect
index d4d5c54..e622baa 100644
--- a/pkg/front_end/testcases/expression/set_literal.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/set_literal.expression.yaml.expect
@@ -3,5 +3,5 @@
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
   return block {
     final dart.core::Set<dart.core::String*>* #t1 = dart.collection::LinkedHashSet::•<dart.core::String*>();
-    #t1.{dart.core::Set::add}("a");
+    #t1.{dart.core::Set::add}{Invariant}("a");
   } =>#t1;
diff --git a/pkg/front_end/testcases/expression/spread_element.expression.yaml.expect b/pkg/front_end/testcases/expression/spread_element.expression.yaml.expect
index 1a1c5a8..e34676b 100644
--- a/pkg/front_end/testcases/expression/spread_element.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/spread_element.expression.yaml.expect
@@ -7,7 +7,7 @@
       dart.core::Iterator<dart.core::String*>* :sync-for-iterator = main::listOfStrings.{dart.core::Iterable::iterator};
       for (; :sync-for-iterator.{dart.core::Iterator::moveNext}(); ) {
         final dart.core::String* #t2 = :sync-for-iterator.{dart.core::Iterator::current};
-        #t1.{dart.core::List::add}(#t2);
+        #t1.{dart.core::List::add}{Invariant}(#t2);
       }
     }
   } =>#t1;
diff --git a/pkg/front_end/testcases/general/constants/const_collections.dart.strong.expect b/pkg/front_end/testcases/general/constants/const_collections.dart.strong.expect
index 46a4481..b9b41ea 100644
--- a/pkg/front_end/testcases/general/constants/const_collections.dart.strong.expect
+++ b/pkg/front_end/testcases/general/constants/const_collections.dart.strong.expect
@@ -407,8 +407,8 @@
 static field core::List<core::String*>* barAsVar = block {
   final core::List<core::String*>* #t1 = <core::String*>[];
   for (final core::String* #t2 in #C8)
-    #t1.{core::List::add}(#t2);
-  #t1.{core::List::add}("!");
+    #t1.{core::List::add}{Invariant}(#t2);
+  #t1.{core::List::add}{Invariant}("!");
 } =>#t1;
 static const field core::List<core::String*>* barWithNullSpread = invalid-expression "Null value during constant evaluation.";
 static const field core::List<core::String*>* barWithIntSpread = invalid-expression "pkg/front_end/testcases/general/constants/const_collections.dart:23:51: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
@@ -482,7 +482,7 @@
   core::print(#C22);
   core::print( block {
     final core::Set<core::String*>* #t3 = col::LinkedHashSet::•<core::String*>();
-    #t3.{core::Set::add}("hello");
+    #t3.{core::Set::add}{Invariant}("hello");
   } =>#t3);
   core::print(#C26);
 }
diff --git a/pkg/front_end/testcases/general/constants/const_collections.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/const_collections.dart.strong.transformed.expect
index 40a8b11..168f850 100644
--- a/pkg/front_end/testcases/general/constants/const_collections.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/const_collections.dart.strong.transformed.expect
@@ -410,10 +410,10 @@
     core::Iterator<core::String*>* :sync-for-iterator = (#C8).{core::Iterable::iterator};
     for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
       final core::String* #t2 = :sync-for-iterator.{core::Iterator::current};
-      #t1.{core::List::add}(#t2);
+      #t1.{core::List::add}{Invariant}(#t2);
     }
   }
-  #t1.{core::List::add}("!");
+  #t1.{core::List::add}{Invariant}("!");
 } =>#t1;
 static const field core::List<core::String*>* barWithNullSpread = invalid-expression "Null value during constant evaluation.";
 static const field core::List<core::String*>* barWithIntSpread = invalid-expression "pkg/front_end/testcases/general/constants/const_collections.dart:23:51: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
@@ -487,7 +487,7 @@
   core::print(#C22);
   core::print( block {
     final core::Set<core::String*>* #t3 = new col::_CompactLinkedHashSet::•<core::String*>();
-    #t3.{core::Set::add}("hello");
+    #t3.{core::Set::add}{Invariant}("hello");
   } =>#t3);
   core::print(#C26);
 }
diff --git a/pkg/front_end/testcases/general/control_flow_collection.dart.strong.expect b/pkg/front_end/testcases/general/control_flow_collection.dart.strong.expect
index 3044135..dffdbc4 100644
--- a/pkg/front_end/testcases/general/control_flow_collection.dart.strong.expect
+++ b/pkg/front_end/testcases/general/control_flow_collection.dart.strong.expect
@@ -6,63 +6,63 @@
 static method main() → dynamic {
   final core::List<core::int*>* aList = block {
     final core::List<core::int*>* #t1 = <core::int*>[];
-    #t1.{core::List::add}(1);
+    #t1.{core::List::add}{Invariant}(1);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t1.{core::List::add}(2);
+      #t1.{core::List::add}{Invariant}(2);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t1.{core::List::add}(3);
+      #t1.{core::List::add}{Invariant}(3);
     else
-      #t1.{core::List::add}(1.{core::int::unary-}());
+      #t1.{core::List::add}{Invariant}(1.{core::int::unary-}());
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t1.{core::List::add}(4);
+        #t1.{core::List::add}{Invariant}(4);
     for (core::int* i in <core::int*>[5, 6, 7])
-      #t1.{core::List::add}(i);
+      #t1.{core::List::add}{Invariant}(i);
     for (core::int* i in <core::int*>[8, 9, 10])
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t1.{core::List::add}(i);
+        #t1.{core::List::add}{Invariant}(i);
     for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
-      #t1.{core::List::add}(i);
+      #t1.{core::List::add}{Invariant}(i);
   } =>#t1;
   final core::Set<core::int*>* aSet = block {
     final core::Set<core::int*>* #t2 = col::LinkedHashSet::•<core::int*>();
-    #t2.{core::Set::add}(1);
+    #t2.{core::Set::add}{Invariant}(1);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t2.{core::Set::add}(2);
+      #t2.{core::Set::add}{Invariant}(2);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t2.{core::Set::add}(3);
+      #t2.{core::Set::add}{Invariant}(3);
     else
-      #t2.{core::Set::add}(1.{core::int::unary-}());
+      #t2.{core::Set::add}{Invariant}(1.{core::int::unary-}());
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t2.{core::Set::add}(4);
+        #t2.{core::Set::add}{Invariant}(4);
     for (core::int* i in <core::int*>[5, 6, 7])
-      #t2.{core::Set::add}(i);
+      #t2.{core::Set::add}{Invariant}(i);
     for (core::int* i in <core::int*>[8, 9, 10])
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t2.{core::Set::add}(i);
+        #t2.{core::Set::add}{Invariant}(i);
     for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
-      #t2.{core::Set::add}(i);
+      #t2.{core::Set::add}{Invariant}(i);
   } =>#t2;
   final core::Map<core::int*, core::int*>* aMap = block {
     final core::Map<core::int*, core::int*>* #t3 = <core::int*, core::int*>{};
-    #t3.{core::Map::[]=}(1, 1);
+    #t3.{core::Map::[]=}{Invariant}(1, 1);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t3.{core::Map::[]=}(2, 2);
+      #t3.{core::Map::[]=}{Invariant}(2, 2);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t3.{core::Map::[]=}(3, 3);
+      #t3.{core::Map::[]=}{Invariant}(3, 3);
     else
-      #t3.{core::Map::[]=}(1.{core::int::unary-}(), 1.{core::int::unary-}());
+      #t3.{core::Map::[]=}{Invariant}(1.{core::int::unary-}(), 1.{core::int::unary-}());
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t3.{core::Map::[]=}(4, 4);
+        #t3.{core::Map::[]=}{Invariant}(4, 4);
     for (core::int* i in <core::int*>[5, 6, 7])
-      #t3.{core::Map::[]=}(i, i);
+      #t3.{core::Map::[]=}{Invariant}(i, i);
     for (core::int* i in <core::int*>[8, 9, 10])
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t3.{core::Map::[]=}(i, i);
+        #t3.{core::Map::[]=}{Invariant}(i, i);
     for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
-      #t3.{core::Map::[]=}(i, i);
+      #t3.{core::Map::[]=}{Invariant}(i, i);
   } =>#t3;
   core::print(aList);
   core::print(aSet);
diff --git a/pkg/front_end/testcases/general/control_flow_collection.dart.strong.transformed.expect b/pkg/front_end/testcases/general/control_flow_collection.dart.strong.transformed.expect
index 6077536..6041ee9 100644
--- a/pkg/front_end/testcases/general/control_flow_collection.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/control_flow_collection.dart.strong.transformed.expect
@@ -6,21 +6,21 @@
 static method main() → dynamic {
   final core::List<core::int*>* aList = block {
     final core::List<core::int*>* #t1 = <core::int*>[];
-    #t1.{core::List::add}(1);
+    #t1.{core::List::add}{Invariant}(1);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t1.{core::List::add}(2);
+      #t1.{core::List::add}{Invariant}(2);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t1.{core::List::add}(3);
+      #t1.{core::List::add}{Invariant}(3);
     else
-      #t1.{core::List::add}(1.{core::int::unary-}());
+      #t1.{core::List::add}{Invariant}(1.{core::int::unary-}());
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t1.{core::List::add}(4);
+        #t1.{core::List::add}{Invariant}(4);
     {
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[5, 6, 7].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
-        #t1.{core::List::add}(i);
+        #t1.{core::List::add}{Invariant}(i);
       }
     }
     {
@@ -28,29 +28,29 @@
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
         if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-          #t1.{core::List::add}(i);
+          #t1.{core::List::add}{Invariant}(i);
       }
     }
     for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
-      #t1.{core::List::add}(i);
+      #t1.{core::List::add}{Invariant}(i);
   } =>#t1;
   final core::Set<core::int*>* aSet = block {
     final core::Set<core::int*>* #t2 = new col::_CompactLinkedHashSet::•<core::int*>();
-    #t2.{core::Set::add}(1);
+    #t2.{core::Set::add}{Invariant}(1);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t2.{core::Set::add}(2);
+      #t2.{core::Set::add}{Invariant}(2);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t2.{core::Set::add}(3);
+      #t2.{core::Set::add}{Invariant}(3);
     else
-      #t2.{core::Set::add}(1.{core::int::unary-}());
+      #t2.{core::Set::add}{Invariant}(1.{core::int::unary-}());
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t2.{core::Set::add}(4);
+        #t2.{core::Set::add}{Invariant}(4);
     {
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[5, 6, 7].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
-        #t2.{core::Set::add}(i);
+        #t2.{core::Set::add}{Invariant}(i);
       }
     }
     {
@@ -58,29 +58,29 @@
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
         if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-          #t2.{core::Set::add}(i);
+          #t2.{core::Set::add}{Invariant}(i);
       }
     }
     for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
-      #t2.{core::Set::add}(i);
+      #t2.{core::Set::add}{Invariant}(i);
   } =>#t2;
   final core::Map<core::int*, core::int*>* aMap = block {
     final core::Map<core::int*, core::int*>* #t3 = <core::int*, core::int*>{};
-    #t3.{core::Map::[]=}(1, 1);
+    #t3.{core::Map::[]=}{Invariant}(1, 1);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t3.{core::Map::[]=}(2, 2);
+      #t3.{core::Map::[]=}{Invariant}(2, 2);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t3.{core::Map::[]=}(3, 3);
+      #t3.{core::Map::[]=}{Invariant}(3, 3);
     else
-      #t3.{core::Map::[]=}(1.{core::int::unary-}(), 1.{core::int::unary-}());
+      #t3.{core::Map::[]=}{Invariant}(1.{core::int::unary-}(), 1.{core::int::unary-}());
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t3.{core::Map::[]=}(4, 4);
+        #t3.{core::Map::[]=}{Invariant}(4, 4);
     {
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[5, 6, 7].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
-        #t3.{core::Map::[]=}(i, i);
+        #t3.{core::Map::[]=}{Invariant}(i, i);
       }
     }
     {
@@ -88,11 +88,11 @@
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
         if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-          #t3.{core::Map::[]=}(i, i);
+          #t3.{core::Map::[]=}{Invariant}(i, i);
       }
     }
     for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
-      #t3.{core::Map::[]=}(i, i);
+      #t3.{core::Map::[]=}{Invariant}(i, i);
   } =>#t3;
   core::print(aList);
   core::print(aSet);
diff --git a/pkg/front_end/testcases/general/control_flow_collection_inference.dart.strong.expect b/pkg/front_end/testcases/general/control_flow_collection_inference.dart.strong.expect
index b84574b..4065ab1 100644
--- a/pkg/front_end/testcases/general/control_flow_collection_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/general/control_flow_collection_inference.dart.strong.expect
@@ -454,195 +454,195 @@
   core::List<core::int*>* list10 = block {
     final core::List<core::int*>* #t1 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t1.{core::List::add}(42);
+      #t1.{core::List::add}{Invariant}(42);
   } =>#t1;
   core::Set<core::int*>* set10 = block {
     final core::Set<core::int*>* #t2 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t2.{core::Set::add}(42);
-    #t2.{core::Set::add}(null);
+      #t2.{core::Set::add}{Invariant}(42);
+    #t2.{core::Set::add}{Invariant}(null);
   } =>#t2;
   core::Map<core::String*, core::int*>* map10 = block {
     final core::Map<core::String*, core::int*>* #t3 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t3.{core::Map::[]=}("bar", 42);
-    #t3.{core::Map::[]=}("baz", null);
+      #t3.{core::Map::[]=}{Invariant}("bar", 42);
+    #t3.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t3;
   core::List<dynamic>* list11 = block {
     final core::List<dynamic>* #t4 = <dynamic>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t4.{core::List::add}(dynVar);
+      #t4.{core::List::add}{Invariant}(dynVar);
   } =>#t4;
   core::Set<dynamic>* set11 = block {
     final core::Set<dynamic>* #t5 = col::LinkedHashSet::•<dynamic>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t5.{core::Set::add}(dynVar);
-    #t5.{core::Set::add}(null);
+      #t5.{core::Set::add}{Invariant}(dynVar);
+    #t5.{core::Set::add}{Invariant}(null);
   } =>#t5;
   core::Map<core::String*, dynamic>* map11 = block {
     final core::Map<core::String*, dynamic>* #t6 = <core::String*, dynamic>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t6.{core::Map::[]=}("bar", dynVar);
-    #t6.{core::Map::[]=}("baz", null);
+      #t6.{core::Map::[]=}{Invariant}("bar", dynVar);
+    #t6.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t6;
   core::List<core::List<core::int*>*>* list12 = block {
     final core::List<core::List<core::int*>*>* #t7 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t7.{core::List::add}(<core::int*>[42]);
+      #t7.{core::List::add}{Invariant}(<core::int*>[42]);
   } =>#t7;
   core::Set<core::List<core::int*>*>* set12 = block {
     final core::Set<core::List<core::int*>*>* #t8 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t8.{core::Set::add}(<core::int*>[42]);
-    #t8.{core::Set::add}(null);
+      #t8.{core::Set::add}{Invariant}(<core::int*>[42]);
+    #t8.{core::Set::add}{Invariant}(null);
   } =>#t8;
   core::Map<core::String*, core::List<core::int*>*>* map12 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t9 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t9.{core::Map::[]=}("bar", <core::int*>[42]);
-    #t9.{core::Map::[]=}("baz", null);
+      #t9.{core::Map::[]=}{Invariant}("bar", <core::int*>[42]);
+    #t9.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t9;
   core::List<core::int*>* list20 = block {
     final core::List<core::int*>* #t10 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::int* #t11 in <core::int*>[42])
-        #t10.{core::List::add}(#t11);
+        #t10.{core::List::add}{Invariant}(#t11);
   } =>#t10;
   core::Set<core::int*>* set20 = block {
     final core::Set<core::int*>* #t12 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::int* #t13 in <core::int*>[42])
-        #t12.{core::Set::add}(#t13);
-    #t12.{core::Set::add}(null);
+        #t12.{core::Set::add}{Invariant}(#t13);
+    #t12.{core::Set::add}{Invariant}(null);
   } =>#t12;
   core::Map<core::String*, core::int*>* map20 = block {
     final core::Map<core::String*, core::int*>* #t14 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, core::int*>* #t15 in <core::String*, core::int*>{"bar": 42}.{core::Map::entries})
-        #t14.{core::Map::[]=}(#t15.{core::MapEntry::key}, #t15.{core::MapEntry::value});
-    #t14.{core::Map::[]=}("baz", null);
+        #t14.{core::Map::[]=}{Invariant}(#t15.{core::MapEntry::key}, #t15.{core::MapEntry::value});
+    #t14.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t14;
   core::List<dynamic>* list21 = block {
     final core::List<dynamic>* #t16 = <dynamic>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final dynamic #t17 in <dynamic>[dynVar])
-        #t16.{core::List::add}(#t17);
+        #t16.{core::List::add}{Invariant}(#t17);
   } =>#t16;
   core::Set<dynamic>* set21 = block {
     final core::Set<dynamic>* #t18 = col::LinkedHashSet::•<dynamic>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final dynamic #t19 in <dynamic>[dynVar])
-        #t18.{core::Set::add}(#t19);
-    #t18.{core::Set::add}(null);
+        #t18.{core::Set::add}{Invariant}(#t19);
+    #t18.{core::Set::add}{Invariant}(null);
   } =>#t18;
   core::Map<core::String*, dynamic>* map21 = block {
     final core::Map<core::String*, dynamic>* #t20 = <core::String*, dynamic>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, dynamic>* #t21 in <core::String*, dynamic>{"bar": dynVar}.{core::Map::entries})
-        #t20.{core::Map::[]=}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
-    #t20.{core::Map::[]=}("baz", null);
+        #t20.{core::Map::[]=}{Invariant}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
+    #t20.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t20;
   core::List<core::List<core::int*>*>* list22 = block {
     final core::List<core::List<core::int*>*>* #t22 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t23 in <core::List<core::int*>*>[<core::int*>[42]])
-        #t22.{core::List::add}(#t23);
+        #t22.{core::List::add}{Invariant}(#t23);
   } =>#t22;
   core::Set<core::List<core::int*>*>* set22 = block {
     final core::Set<core::List<core::int*>*>* #t24 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t25 in <core::List<core::int*>*>[<core::int*>[42]])
-        #t24.{core::Set::add}(#t25);
-    #t24.{core::Set::add}(null);
+        #t24.{core::Set::add}{Invariant}(#t25);
+    #t24.{core::Set::add}{Invariant}(null);
   } =>#t24;
   core::Map<core::String*, core::List<core::int*>*>* map22 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t26 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t27 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[42]}.{core::Map::entries})
-        #t26.{core::Map::[]=}(#t27.{core::MapEntry::key}, #t27.{core::MapEntry::value});
-    #t26.{core::Map::[]=}("baz", null);
+        #t26.{core::Map::[]=}{Invariant}(#t27.{core::MapEntry::key}, #t27.{core::MapEntry::value});
+    #t26.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t26;
   core::List<core::int*>* list30 = block {
     final core::List<core::int*>* #t28 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t29 in <core::int*>[42])
-          #t28.{core::List::add}(#t29);
+          #t28.{core::List::add}{Invariant}(#t29);
   } =>#t28;
   core::Set<core::int*>* set30 = block {
     final core::Set<core::int*>* #t30 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t31 in <core::int*>[42])
-          #t30.{core::Set::add}(#t31);
-    #t30.{core::Set::add}(null);
+          #t30.{core::Set::add}{Invariant}(#t31);
+    #t30.{core::Set::add}{Invariant}(null);
   } =>#t30;
   core::Map<core::String*, core::int*>* map30 = block {
     final core::Map<core::String*, core::int*>* #t32 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::int*>* #t33 in <core::String*, core::int*>{"bar": 42}.{core::Map::entries})
-          #t32.{core::Map::[]=}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
-    #t32.{core::Map::[]=}("baz", null);
+          #t32.{core::Map::[]=}{Invariant}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
+    #t32.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t32;
   core::List<dynamic>* list31 = block {
     final core::List<dynamic>* #t34 = <dynamic>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final dynamic #t35 in <dynamic>[dynVar])
-          #t34.{core::List::add}(#t35);
+          #t34.{core::List::add}{Invariant}(#t35);
   } =>#t34;
   core::Set<dynamic>* set31 = block {
     final core::Set<dynamic>* #t36 = col::LinkedHashSet::•<dynamic>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final dynamic #t37 in <dynamic>[dynVar])
-          #t36.{core::Set::add}(#t37);
-    #t36.{core::Set::add}(null);
+          #t36.{core::Set::add}{Invariant}(#t37);
+    #t36.{core::Set::add}{Invariant}(null);
   } =>#t36;
   core::Map<core::String*, dynamic>* map31 = block {
     final core::Map<core::String*, dynamic>* #t38 = <core::String*, dynamic>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, dynamic>* #t39 in <core::String*, dynamic>{"bar": dynVar}.{core::Map::entries})
-          #t38.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
-    #t38.{core::Map::[]=}("baz", null);
+          #t38.{core::Map::[]=}{Invariant}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+    #t38.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t38;
   core::List<core::List<core::int*>*>* list33 = block {
     final core::List<core::List<core::int*>*>* #t40 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t41 in <core::List<core::int*>*>[<core::int*>[42]])
-          #t40.{core::List::add}(#t41);
+          #t40.{core::List::add}{Invariant}(#t41);
   } =>#t40;
   core::Set<core::List<core::int*>*>* set33 = block {
     final core::Set<core::List<core::int*>*>* #t42 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t43 in <core::List<core::int*>*>[<core::int*>[42]])
-          #t42.{core::Set::add}(#t43);
-    #t42.{core::Set::add}(null);
+          #t42.{core::Set::add}{Invariant}(#t43);
+    #t42.{core::Set::add}{Invariant}(null);
   } =>#t42;
   core::Map<core::String*, core::List<core::int*>*>* map33 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t44 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t45 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[42]}.{core::Map::entries})
-          #t44.{core::Map::[]=}(#t45.{core::MapEntry::key}, #t45.{core::MapEntry::value});
-    #t44.{core::Map::[]=}("baz", null);
+          #t44.{core::Map::[]=}{Invariant}(#t45.{core::MapEntry::key}, #t45.{core::MapEntry::value});
+    #t44.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t44;
   core::List<core::List<core::int*>*>* list40 = block {
     final core::List<core::List<core::int*>*>* #t46 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t47 in <core::List<core::int*>*>[<core::int*>[]])
-        #t46.{core::List::add}(#t47);
+        #t46.{core::List::add}{Invariant}(#t47);
   } =>#t46;
   core::Set<core::List<core::int*>*>* set40 = block {
     final core::Set<core::List<core::int*>*>* #t48 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t49 in <core::List<core::int*>*>[<core::int*>[]])
-        #t48.{core::Set::add}(#t49);
-    #t48.{core::Set::add}(null);
+        #t48.{core::Set::add}{Invariant}(#t49);
+    #t48.{core::Set::add}{Invariant}(null);
   } =>#t48;
   core::Map<core::String*, core::List<core::int*>*>* map40 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:39:34: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
   Map<String, List<int>> map40 = {if (oracle(\"foo\")) ...{\"bar\", []}, \"baz\": null};
@@ -652,62 +652,62 @@
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t51 in block {
         final core::Set<core::List<core::int*>*>* #t52 = col::LinkedHashSet::•<core::List<core::int*>*>();
-        #t52.{core::Set::add}(<core::int*>[]);
+        #t52.{core::Set::add}{Invariant}(<core::int*>[]);
       } =>#t52)
-        #t50.{core::List::add}(#t51);
+        #t50.{core::List::add}{Invariant}(#t51);
   } =>#t50;
   core::Set<core::List<core::int*>*>* set41 = block {
     final core::Set<core::List<core::int*>*>* #t53 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t54 in block {
         final core::Set<core::List<core::int*>*>* #t55 = col::LinkedHashSet::•<core::List<core::int*>*>();
-        #t55.{core::Set::add}(<core::int*>[]);
+        #t55.{core::Set::add}{Invariant}(<core::int*>[]);
       } =>#t55)
-        #t53.{core::Set::add}(#t54);
-    #t53.{core::Set::add}(null);
+        #t53.{core::Set::add}{Invariant}(#t54);
+    #t53.{core::Set::add}{Invariant}(null);
   } =>#t53;
   core::List<core::List<core::int*>*>* list42 = block {
     final core::List<core::List<core::int*>*>* #t56 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t57 in <core::List<core::int*>*>[<core::int*>[]])
-          #t56.{core::List::add}(#t57);
+          #t56.{core::List::add}{Invariant}(#t57);
   } =>#t56;
   core::Set<core::List<core::int*>*>* set42 = block {
     final core::Set<core::List<core::int*>*>* #t58 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t59 in <core::List<core::int*>*>[<core::int*>[]])
-          #t58.{core::Set::add}(#t59);
-    #t58.{core::Set::add}(null);
+          #t58.{core::Set::add}{Invariant}(#t59);
+    #t58.{core::Set::add}{Invariant}(null);
   } =>#t58;
   core::Map<core::String*, core::List<core::int*>*>* map42 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t60 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t61 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries})
-          #t60.{core::Map::[]=}(#t61.{core::MapEntry::key}, #t61.{core::MapEntry::value});
-    #t60.{core::Map::[]=}("baz", null);
+          #t60.{core::Map::[]=}{Invariant}(#t61.{core::MapEntry::key}, #t61.{core::MapEntry::value});
+    #t60.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t60;
   core::List<core::int*>* list50 = block {
     final core::List<core::int*>* #t62 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::int* #t63 in <core::int*>[])
-        #t62.{core::List::add}(#t63);
+        #t62.{core::List::add}{Invariant}(#t63);
   } =>#t62;
   core::Set<core::int*>* set50 = block {
     final core::Set<core::int*>* #t64 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::int* #t65 in <core::int*>[])
-        #t64.{core::Set::add}(#t65);
-    #t64.{core::Set::add}(null);
+        #t64.{core::Set::add}{Invariant}(#t65);
+    #t64.{core::Set::add}{Invariant}(null);
   } =>#t64;
   core::Map<core::String*, core::int*>* map50 = block {
     final core::Map<core::String*, core::int*>* #t66 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, core::int*>* #t67 in <core::String*, core::int*>{}.{core::Map::entries})
-        #t66.{core::Map::[]=}(#t67.{core::MapEntry::key}, #t67.{core::MapEntry::value});
-    #t66.{core::Map::[]=}("baz", null);
+        #t66.{core::Map::[]=}{Invariant}(#t67.{core::MapEntry::key}, #t67.{core::MapEntry::value});
+    #t66.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t66;
   core::List<core::int*>* list51 = block {
     final core::List<core::int*>* #t68 = <core::int*>[];
@@ -715,7 +715,7 @@
       for (final core::int* #t69 in block {
         final core::Set<core::int*>* #t70 = col::LinkedHashSet::•<core::int*>();
       } =>#t70)
-        #t68.{core::List::add}(#t69);
+        #t68.{core::List::add}{Invariant}(#t69);
   } =>#t68;
   core::Set<core::int*>* set51 = block {
     final core::Set<core::int*>* #t71 = col::LinkedHashSet::•<core::int*>();
@@ -723,231 +723,231 @@
       for (final core::int* #t72 in block {
         final core::Set<core::int*>* #t73 = col::LinkedHashSet::•<core::int*>();
       } =>#t73)
-        #t71.{core::Set::add}(#t72);
-    #t71.{core::Set::add}(null);
+        #t71.{core::Set::add}{Invariant}(#t72);
+    #t71.{core::Set::add}{Invariant}(null);
   } =>#t71;
   core::List<core::int*>* list52 = block {
     final core::List<core::int*>* #t74 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t75 in <core::int*>[])
-          #t74.{core::List::add}(#t75);
+          #t74.{core::List::add}{Invariant}(#t75);
   } =>#t74;
   core::Set<core::int*>* set52 = block {
     final core::Set<core::int*>* #t76 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t77 in <core::int*>[])
-          #t76.{core::Set::add}(#t77);
-    #t76.{core::Set::add}(null);
+          #t76.{core::Set::add}{Invariant}(#t77);
+    #t76.{core::Set::add}{Invariant}(null);
   } =>#t76;
   core::Map<core::String*, core::int*>* map52 = block {
     final core::Map<core::String*, core::int*>* #t78 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::int*>* #t79 in <core::String*, core::int*>{}.{core::Map::entries})
-          #t78.{core::Map::[]=}(#t79.{core::MapEntry::key}, #t79.{core::MapEntry::value});
-    #t78.{core::Map::[]=}("baz", null);
+          #t78.{core::Map::[]=}{Invariant}(#t79.{core::MapEntry::key}, #t79.{core::MapEntry::value});
+    #t78.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t78;
   core::List<core::List<core::int*>*>* list60 = block {
     final core::List<core::List<core::int*>*>* #t80 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t81 in <core::List<core::int*>*>[<core::int*>[]])
-        #t80.{core::List::add}(#t81);
+        #t80.{core::List::add}{Invariant}(#t81);
   } =>#t80;
   core::Set<core::List<core::int*>*>* set60 = block {
     final core::Set<core::List<core::int*>*>* #t82 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t83 in <core::List<core::int*>*>[<core::int*>[]])
-        #t82.{core::Set::add}(#t83);
-    #t82.{core::Set::add}(null);
+        #t82.{core::Set::add}{Invariant}(#t83);
+    #t82.{core::Set::add}{Invariant}(null);
   } =>#t82;
   core::Map<core::String*, core::List<core::int*>*>* map60 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t84 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t85 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries})
-        #t84.{core::Map::[]=}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
-    #t84.{core::Map::[]=}("baz", null);
+        #t84.{core::Map::[]=}{Invariant}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
+    #t84.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t84;
   core::List<core::List<core::int*>*>* list61 = block {
     final core::List<core::List<core::int*>*>* #t86 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t87 in <core::List<core::int*>*>[<core::int*>[]])
-          #t86.{core::List::add}(#t87);
+          #t86.{core::List::add}{Invariant}(#t87);
   } =>#t86;
   core::Set<core::List<core::int*>*>* set61 = block {
     final core::Set<core::List<core::int*>*>* #t88 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t89 in <core::List<core::int*>*>[<core::int*>[]])
-          #t88.{core::Set::add}(#t89);
-    #t88.{core::Set::add}(null);
+          #t88.{core::Set::add}{Invariant}(#t89);
+    #t88.{core::Set::add}{Invariant}(null);
   } =>#t88;
   core::Map<core::String*, core::List<core::int*>*>* map61 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t90 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t91 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries})
-          #t90.{core::Map::[]=}(#t91.{core::MapEntry::key}, #t91.{core::MapEntry::value});
-    #t90.{core::Map::[]=}("baz", null);
+          #t90.{core::Map::[]=}{Invariant}(#t91.{core::MapEntry::key}, #t91.{core::MapEntry::value});
+    #t90.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t90;
   core::List<core::List<core::int*>*>* list70 = block {
     final core::List<core::List<core::int*>*>* #t92 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t92.{core::List::add}(<core::int*>[]);
+      #t92.{core::List::add}{Invariant}(<core::int*>[]);
   } =>#t92;
   core::Set<core::List<core::int*>*>* set70 = block {
     final core::Set<core::List<core::int*>*>* #t93 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t93.{core::Set::add}(<core::int*>[]);
-    #t93.{core::Set::add}(null);
+      #t93.{core::Set::add}{Invariant}(<core::int*>[]);
+    #t93.{core::Set::add}{Invariant}(null);
   } =>#t93;
   core::List<core::List<core::int*>*>* list71 = block {
     final core::List<core::List<core::int*>*>* #t94 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t94.{core::List::add}(<core::int*>[]);
+        #t94.{core::List::add}{Invariant}(<core::int*>[]);
   } =>#t94;
   core::Set<core::List<core::int*>*>* set71 = block {
     final core::Set<core::List<core::int*>*>* #t95 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t95.{core::Set::add}(<core::int*>[]);
-    #t95.{core::Set::add}(null);
+        #t95.{core::Set::add}{Invariant}(<core::int*>[]);
+    #t95.{core::Set::add}{Invariant}(null);
   } =>#t95;
   core::List<core::num*>* list80 = block {
     final core::List<core::num*>* #t96 = <core::num*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t96.{core::List::add}(42);
+      #t96.{core::List::add}{Invariant}(42);
     else
-      #t96.{core::List::add}(3.14);
+      #t96.{core::List::add}{Invariant}(3.14);
   } =>#t96;
   core::Set<core::num*>* set80 = block {
     final core::Set<core::num*>* #t97 = col::LinkedHashSet::•<core::num*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t97.{core::Set::add}(42);
+      #t97.{core::Set::add}{Invariant}(42);
     else
-      #t97.{core::Set::add}(3.14);
-    #t97.{core::Set::add}(null);
+      #t97.{core::Set::add}{Invariant}(3.14);
+    #t97.{core::Set::add}{Invariant}(null);
   } =>#t97;
   core::Map<core::String*, core::num*>* map80 = block {
     final core::Map<core::String*, core::num*>* #t98 = <core::String*, core::num*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t98.{core::Map::[]=}("bar", 42);
+      #t98.{core::Map::[]=}{Invariant}("bar", 42);
     else
-      #t98.{core::Map::[]=}("bar", 3.14);
-    #t98.{core::Map::[]=}("baz", null);
+      #t98.{core::Map::[]=}{Invariant}("bar", 3.14);
+    #t98.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t98;
   core::List<core::num*>* list81 = block {
     final core::List<core::num*>* #t99 = <core::num*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::num* #t100 in listInt)
-        #t99.{core::List::add}(#t100);
+        #t99.{core::List::add}{Invariant}(#t100);
     else
       for (final core::num* #t101 in listDouble)
-        #t99.{core::List::add}(#t101);
+        #t99.{core::List::add}{Invariant}(#t101);
   } =>#t99;
   core::Set<core::num*>* set81 = block {
     final core::Set<core::num*>* #t102 = col::LinkedHashSet::•<core::num*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::num* #t103 in listInt)
-        #t102.{core::Set::add}(#t103);
+        #t102.{core::Set::add}{Invariant}(#t103);
     else
       for (final core::num* #t104 in listDouble)
-        #t102.{core::Set::add}(#t104);
-    #t102.{core::Set::add}(null);
+        #t102.{core::Set::add}{Invariant}(#t104);
+    #t102.{core::Set::add}{Invariant}(null);
   } =>#t102;
   core::Map<core::String*, core::num*>* map81 = block {
     final core::Map<core::String*, core::num*>* #t105 = <core::String*, core::num*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, core::num*>* #t106 in mapToInt.{core::Map::entries})
-        #t105.{core::Map::[]=}(#t106.{core::MapEntry::key}, #t106.{core::MapEntry::value});
+        #t105.{core::Map::[]=}{Invariant}(#t106.{core::MapEntry::key}, #t106.{core::MapEntry::value});
     else
       for (final core::MapEntry<core::String*, core::num*>* #t107 in mapToDouble.{core::Map::entries})
-        #t105.{core::Map::[]=}(#t107.{core::MapEntry::key}, #t107.{core::MapEntry::value});
-    #t105.{core::Map::[]=}("baz", null);
+        #t105.{core::Map::[]=}{Invariant}(#t107.{core::MapEntry::key}, #t107.{core::MapEntry::value});
+    #t105.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t105;
   core::List<dynamic>* list82 = block {
     final core::List<dynamic>* #t108 = <dynamic>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final dynamic #t109 in listInt)
-        #t108.{core::List::add}(#t109);
+        #t108.{core::List::add}{Invariant}(#t109);
     else
       for (final dynamic #t110 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-        #t108.{core::List::add}(#t110);
+        #t108.{core::List::add}{Invariant}(#t110);
   } =>#t108;
   core::Set<dynamic>* set82 = block {
     final core::Set<dynamic>* #t111 = col::LinkedHashSet::•<dynamic>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final dynamic #t112 in listInt)
-        #t111.{core::Set::add}(#t112);
+        #t111.{core::Set::add}{Invariant}(#t112);
     else
       for (final dynamic #t113 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-        #t111.{core::Set::add}(#t113);
-    #t111.{core::Set::add}(null);
+        #t111.{core::Set::add}{Invariant}(#t113);
+    #t111.{core::Set::add}{Invariant}(null);
   } =>#t111;
   core::Set<dynamic>* map82 = block {
     final core::Set<dynamic>* #t114 = col::LinkedHashSet::•<dynamic>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t114.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:71:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t114.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:71:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   var map82 = {if (oracle(\"foo\")) ...mapToInt else ...dynVar, null};
                                      ^");
     else
       for (final dynamic #t115 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-        #t114.{core::Set::add}(#t115);
-    #t114.{core::Set::add}(null);
+        #t114.{core::Set::add}{Invariant}(#t115);
+    #t114.{core::Set::add}{Invariant}(null);
   } =>#t114;
   core::List<core::num*>* list83 = block {
     final core::List<core::num*>* #t116 = <core::num*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t116.{core::List::add}(42);
+      #t116.{core::List::add}{Invariant}(42);
     else
       for (final core::num* #t117 in listDouble)
-        #t116.{core::List::add}(#t117);
+        #t116.{core::List::add}{Invariant}(#t117);
   } =>#t116;
   core::Set<core::num*>* set83 = block {
     final core::Set<core::num*>* #t118 = col::LinkedHashSet::•<core::num*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::num* #t119 in listInt)
-        #t118.{core::Set::add}(#t119);
+        #t118.{core::Set::add}{Invariant}(#t119);
     else
-      #t118.{core::Set::add}(3.14);
-    #t118.{core::Set::add}(null);
+      #t118.{core::Set::add}{Invariant}(3.14);
+    #t118.{core::Set::add}{Invariant}(null);
   } =>#t118;
   core::Map<core::String*, core::num*>* map83 = block {
     final core::Map<core::String*, core::num*>* #t120 = <core::String*, core::num*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, core::num*>* #t121 in mapToInt.{core::Map::entries})
-        #t120.{core::Map::[]=}(#t121.{core::MapEntry::key}, #t121.{core::MapEntry::value});
+        #t120.{core::Map::[]=}{Invariant}(#t121.{core::MapEntry::key}, #t121.{core::MapEntry::value});
     else
-      #t120.{core::Map::[]=}("bar", 3.14);
-    #t120.{core::Map::[]=}("baz", null);
+      #t120.{core::Map::[]=}{Invariant}("bar", 3.14);
+    #t120.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t120;
   core::List<core::int*>* list90 = block {
     final core::List<core::int*>* #t122 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t122.{core::List::add}(dynVar as{TypeError,ForDynamic} core::int*);
+      #t122.{core::List::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*);
   } =>#t122;
   core::Set<core::int*>* set90 = block {
     final core::Set<core::int*>* #t123 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t123.{core::Set::add}(dynVar as{TypeError,ForDynamic} core::int*);
-    #t123.{core::Set::add}(null);
+      #t123.{core::Set::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*);
+    #t123.{core::Set::add}{Invariant}(null);
   } =>#t123;
   core::Map<core::String*, core::int*>* map90 = block {
     final core::Map<core::String*, core::int*>* #t124 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t124.{core::Map::[]=}("bar", dynVar as{TypeError,ForDynamic} core::int*);
-    #t124.{core::Map::[]=}("baz", null);
+      #t124.{core::Map::[]=}{Invariant}("bar", dynVar as{TypeError,ForDynamic} core::int*);
+    #t124.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t124;
   core::List<core::int*>* list91 = block {
     final core::List<core::int*>* #t125 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final dynamic #t126 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*) {
         final core::int* #t127 = #t126 as{TypeError} core::int*;
-        #t125.{core::List::add}(#t127);
+        #t125.{core::List::add}{Invariant}(#t127);
       }
   } =>#t125;
   core::Set<core::int*>* set91 = block {
@@ -955,9 +955,9 @@
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final dynamic #t129 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*) {
         final core::int* #t130 = #t129 as{TypeError} core::int*;
-        #t128.{core::Set::add}(#t130);
+        #t128.{core::Set::add}{Invariant}(#t130);
       }
-    #t128.{core::Set::add}(null);
+    #t128.{core::Set::add}{Invariant}(null);
   } =>#t128;
   core::Map<core::String*, core::int*>* map91 = block {
     final core::Map<core::String*, core::int*>* #t131 = <core::String*, core::int*>{};
@@ -965,49 +965,49 @@
       for (final core::MapEntry<dynamic, dynamic>* #t132 in (dynVar as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries}) {
         final core::String* #t133 = #t132.{core::MapEntry::key} as{TypeError} core::String*;
         final core::int* #t134 = #t132.{core::MapEntry::value} as{TypeError} core::int*;
-        #t131.{core::Map::[]=}(#t133, #t134);
+        #t131.{core::Map::[]=}{Invariant}(#t133, #t134);
       }
-    #t131.{core::Map::[]=}("baz", null);
+    #t131.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t131;
   core::List<core::int*>* list100 = block {
     final core::List<core::int*>* #t135 = <core::int*>[];
     if(dynVar as{TypeError,ForDynamic} core::bool*)
-      #t135.{core::List::add}(42);
+      #t135.{core::List::add}{Invariant}(42);
   } =>#t135;
   core::Set<core::int*>* set100 = block {
     final core::Set<core::int*>* #t136 = col::LinkedHashSet::•<core::int*>();
     if(dynVar as{TypeError,ForDynamic} core::bool*)
-      #t136.{core::Set::add}(42);
+      #t136.{core::Set::add}{Invariant}(42);
   } =>#t136;
   core::Map<core::int*, core::int*>* map100 = block {
     final core::Map<core::int*, core::int*>* #t137 = <core::int*, core::int*>{};
     if(dynVar as{TypeError,ForDynamic} core::bool*)
-      #t137.{core::Map::[]=}(42, 42);
+      #t137.{core::Map::[]=}{Invariant}(42, 42);
   } =>#t137;
 }
 static method testIfElementErrors(core::Map<core::int*, core::int*>* map) → dynamic {
   block {
     final core::List<core::int*>* #t138 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t138.{core::List::add}(let final<BottomType> #t139 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:87:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+      #t138.{core::List::add}{Invariant}(let final<BottomType> #t139 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:87:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>[if (oracle(\"foo\")) \"bar\"];
                            ^" in "bar" as{TypeError} core::int*);
   } =>#t138;
   block {
     final core::Set<core::int*>* #t140 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t140.{core::Set::add}(let final<BottomType> #t141 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:88:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+      #t140.{core::Set::add}{Invariant}(let final<BottomType> #t141 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:88:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>{if (oracle(\"foo\")) \"bar\", null};
                            ^" in "bar" as{TypeError} core::int*);
-    #t140.{core::Set::add}(null);
+    #t140.{core::Set::add}{Invariant}(null);
   } =>#t140;
   block {
     final core::Map<core::String*, core::int*>* #t142 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t142.{core::Map::[]=}("bar", let final<BottomType> #t143 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:89:43: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+      #t142.{core::Map::[]=}{Invariant}("bar", let final<BottomType> #t143 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:89:43: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <String, int>{if (oracle(\"foo\")) \"bar\": \"bar\", \"baz\": null};
                                           ^" in "bar" as{TypeError} core::int*);
-    #t142.{core::Map::[]=}("baz", null);
+    #t142.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t142;
   block {
     final core::List<core::int*>* #t144 = <core::int*>[];
@@ -1015,7 +1015,7 @@
       for (final core::int* #t145 in <core::int*>[let final<BottomType> #t146 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:90:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>[if (oracle(\"foo\")) ...[\"bar\"]];
                                ^" in "bar" as{TypeError} core::int*])
-        #t144.{core::List::add}(#t145);
+        #t144.{core::List::add}{Invariant}(#t145);
   } =>#t144;
   block {
     final core::Set<core::int*>* #t147 = col::LinkedHashSet::•<core::int*>();
@@ -1023,8 +1023,8 @@
       for (final core::int* #t148 in <core::int*>[let final<BottomType> #t149 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:91:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>{if (oracle(\"foo\")) ...[\"bar\"], null};
                                ^" in "bar" as{TypeError} core::int*])
-        #t147.{core::Set::add}(#t148);
-    #t147.{core::Set::add}(null);
+        #t147.{core::Set::add}{Invariant}(#t148);
+    #t147.{core::Set::add}{Invariant}(null);
   } =>#t147;
   block {
     final core::Map<core::String*, core::int*>* #t150 = <core::String*, core::int*>{};
@@ -1032,13 +1032,13 @@
       for (final core::MapEntry<core::String*, core::int*>* #t151 in <core::String*, core::int*>{"bar": let final<BottomType> #t152 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:92:47: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <String, int>{if (oracle(\"foo\")) ...{\"bar\": \"bar\"}, \"baz\": null};
                                               ^" in "bar" as{TypeError} core::int*}.{core::Map::entries})
-        #t150.{core::Map::[]=}(#t151.{core::MapEntry::key}, #t151.{core::MapEntry::value});
-    #t150.{core::Map::[]=}("baz", null);
+        #t150.{core::Map::[]=}{Invariant}(#t151.{core::MapEntry::key}, #t151.{core::MapEntry::value});
+    #t150.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t150;
   block {
     final core::List<core::int*>* #t153 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t153.{core::List::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:93:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t153.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:93:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[if (oracle(\"foo\")) ...map];
                               ^");
@@ -1046,11 +1046,11 @@
   block {
     final core::Set<core::int*>* #t154 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t154.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:94:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t154.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:94:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{if (oracle(\"foo\")) ...map, null};
                               ^");
-    #t154.{core::Set::add}(null);
+    #t154.{core::Set::add}{Invariant}(null);
   } =>#t154;
   <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:95:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -1062,58 +1062,58 @@
   block {
     final core::List<core::String*>* #t155 = <core::String*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t155.{core::List::add}(let final<BottomType> #t156 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:96:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t155.{core::List::add}{Invariant}(let final<BottomType> #t156 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:96:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String>[if (oracle(\"foo\")) 42 else 3.14];
                               ^" in 42 as{TypeError} core::String*);
     else
-      #t155.{core::List::add}(let final<BottomType> #t157 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:96:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+      #t155.{core::List::add}{Invariant}(let final<BottomType> #t157 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:96:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String>[if (oracle(\"foo\")) 42 else 3.14];
                                       ^" in 3.14 as{TypeError} core::String*);
   } =>#t155;
   block {
     final core::Set<core::String*>* #t158 = col::LinkedHashSet::•<core::String*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t158.{core::Set::add}(let final<BottomType> #t159 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:97:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t158.{core::Set::add}{Invariant}(let final<BottomType> #t159 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:97:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String>{if (oracle(\"foo\")) 42 else 3.14, null};
                               ^" in 42 as{TypeError} core::String*);
     else
-      #t158.{core::Set::add}(let final<BottomType> #t160 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:97:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+      #t158.{core::Set::add}{Invariant}(let final<BottomType> #t160 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:97:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String>{if (oracle(\"foo\")) 42 else 3.14, null};
                                       ^" in 3.14 as{TypeError} core::String*);
-    #t158.{core::Set::add}(null);
+    #t158.{core::Set::add}{Invariant}(null);
   } =>#t158;
   block {
     final core::Map<core::String*, core::String*>* #t161 = <core::String*, core::String*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t161.{core::Map::[]=}("bar", let final<BottomType> #t162 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:98:46: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t161.{core::Map::[]=}{Invariant}("bar", let final<BottomType> #t162 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:98:46: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String, String>{if (oracle(\"foo\")) \"bar\": 42 else \"baz\": 3.14, \"baz\": null};
                                              ^" in 42 as{TypeError} core::String*);
     else
-      #t161.{core::Map::[]=}("baz", let final<BottomType> #t163 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:98:61: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+      #t161.{core::Map::[]=}{Invariant}("baz", let final<BottomType> #t163 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:98:61: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String, String>{if (oracle(\"foo\")) \"bar\": 42 else \"baz\": 3.14, \"baz\": null};
                                                             ^" in 3.14 as{TypeError} core::String*);
-    #t161.{core::Map::[]=}("baz", null);
+    #t161.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t161;
   block {
     final core::List<core::int*>* #t164 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t164.{core::List::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:99:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t164.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:99:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[if (oracle(\"foo\")) ...map else 42];
                               ^");
     else
-      #t164.{core::List::add}(42);
+      #t164.{core::List::add}{Invariant}(42);
   } =>#t164;
   block {
     final core::Set<core::int*>* #t165 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t165.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:100:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t165.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:100:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{if (oracle(\"foo\")) ...map else 42, null};
                               ^");
     else
-      #t165.{core::Set::add}(42);
-    #t165.{core::Set::add}(null);
+      #t165.{core::Set::add}{Invariant}(42);
+    #t165.{core::Set::add}{Invariant}(null);
   } =>#t165;
   <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:101:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -1125,9 +1125,9 @@
   block {
     final core::List<core::int*>* #t166 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t166.{core::List::add}(42);
+      #t166.{core::List::add}{Invariant}(42);
     else
-      #t166.{core::List::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:102:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t166.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:102:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[if (oracle(\"foo\")) 42 else ...map];
                                       ^");
@@ -1135,13 +1135,13 @@
   block {
     final core::Set<core::int*>* #t167 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t167.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:103:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t167.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:103:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{if (oracle(\"foo\")) ...map else 42, null};
                               ^");
     else
-      #t167.{core::Set::add}(42);
-    #t167.{core::Set::add}(null);
+      #t167.{core::Set::add}{Invariant}(42);
+    #t167.{core::Set::add}{Invariant}(null);
   } =>#t167;
   <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:104:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -1173,63 +1173,63 @@
     if(let final<BottomType> #t169 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:112:27: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
   List<int> list20 = [if (42) 42];
                           ^" in 42 as{TypeError} core::bool*)
-      #t168.{core::List::add}(42);
+      #t168.{core::List::add}{Invariant}(42);
   } =>#t168;
   core::Set<core::int*>* set20 = block {
     final core::Set<core::int*>* #t170 = col::LinkedHashSet::•<core::int*>();
     if(let final<BottomType> #t171 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:113:25: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
   Set<int> set20 = {if (42) 42};
                         ^" in 42 as{TypeError} core::bool*)
-      #t170.{core::Set::add}(42);
+      #t170.{core::Set::add}{Invariant}(42);
   } =>#t170;
   core::Map<core::int*, core::int*>* map30 = block {
     final core::Map<core::int*, core::int*>* #t172 = <core::int*, core::int*>{};
     if(let final<BottomType> #t173 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:114:30: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
   Map<int, int> map30 = {if (42) 42: 42};
                              ^" in 42 as{TypeError} core::bool*)
-      #t172.{core::Map::[]=}(42, 42);
+      #t172.{core::Map::[]=}{Invariant}(42, 42);
   } =>#t172;
   core::List<core::String*>* list40 = block {
     final core::List<core::String*>* #t174 = <core::String*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t174.{core::List::add}(let final<BottomType> #t175 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:115:53: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+      #t174.{core::List::add}{Invariant}(let final<BottomType> #t175 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:115:53: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
   List<String> list40 = <String>[if (oracle(\"foo\")) true else 42];
                                                     ^" in true as{TypeError} core::String*);
     else
-      #t174.{core::List::add}(let final<BottomType> #t176 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:115:63: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t174.{core::List::add}{Invariant}(let final<BottomType> #t176 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:115:63: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   List<String> list40 = <String>[if (oracle(\"foo\")) true else 42];
                                                               ^" in 42 as{TypeError} core::String*);
   } =>#t174;
   core::Set<core::String*>* set40 = block {
     final core::Set<core::String*>* #t177 = col::LinkedHashSet::•<core::String*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t177.{core::Set::add}(let final<BottomType> #t178 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:116:51: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+      #t177.{core::Set::add}{Invariant}(let final<BottomType> #t178 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:116:51: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
   Set<String> set40 = <String>{if (oracle(\"foo\")) true else 42};
                                                   ^" in true as{TypeError} core::String*);
     else
-      #t177.{core::Set::add}(let final<BottomType> #t179 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:116:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t177.{core::Set::add}{Invariant}(let final<BottomType> #t179 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:116:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   Set<String> set40 = <String>{if (oracle(\"foo\")) true else 42};
                                                             ^" in 42 as{TypeError} core::String*);
   } =>#t177;
   core::Map<core::String*, core::int*>* map40 = block {
     final core::Map<core::String*, core::int*>* #t180 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t180.{core::Map::[]=}(let final<BottomType> #t181 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:117:61: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+      #t180.{core::Map::[]=}{Invariant}(let final<BottomType> #t181 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:117:61: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
   Map<String, int> map40 = <String, int>{if (oracle(\"foo\")) true: 42 else 42: 42};
                                                             ^" in true as{TypeError} core::String*, 42);
     else
-      #t180.{core::Map::[]=}(let final<BottomType> #t182 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:117:75: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t180.{core::Map::[]=}{Invariant}(let final<BottomType> #t182 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:117:75: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   Map<String, int> map40 = <String, int>{if (oracle(\"foo\")) true: 42 else 42: 42};
                                                                           ^" in 42 as{TypeError} core::String*, 42);
   } =>#t180;
   core::Map<core::int*, core::String*>* map41 = block {
     final core::Map<core::int*, core::String*>* #t183 = <core::int*, core::String*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t183.{core::Map::[]=}(42, let final<BottomType> #t184 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:118:65: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+      #t183.{core::Map::[]=}{Invariant}(42, let final<BottomType> #t184 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:118:65: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
   Map<int, String> map41 = <int, String>{if (oracle(\"foo\")) 42: true else 42: 42};
                                                                 ^" in true as{TypeError} core::String*);
     else
-      #t183.{core::Map::[]=}(42, let final<BottomType> #t185 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:118:79: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t183.{core::Map::[]=}{Invariant}(42, let final<BottomType> #t185 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:118:79: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   Map<int, String> map41 = <int, String>{if (oracle(\"foo\")) 42: true else 42: 42};
                                                                               ^" in 42 as{TypeError} core::String*);
   } =>#t183;
@@ -1238,264 +1238,264 @@
   core::List<core::int*>* list10 = block {
     final core::List<core::int*>* #t186 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t186.{core::List::add}(42);
+      #t186.{core::List::add}{Invariant}(42);
   } =>#t186;
   core::Set<core::int*>* set10 = block {
     final core::Set<core::int*>* #t187 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t187.{core::Set::add}(42);
-    #t187.{core::Set::add}(null);
+      #t187.{core::Set::add}{Invariant}(42);
+    #t187.{core::Set::add}{Invariant}(null);
   } =>#t187;
   core::Map<core::String*, core::int*>* map10 = block {
     final core::Map<core::String*, core::int*>* #t188 = <core::String*, core::int*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t188.{core::Map::[]=}("bar", 42);
-    #t188.{core::Map::[]=}("baz", null);
+      #t188.{core::Map::[]=}{Invariant}("bar", 42);
+    #t188.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t188;
   core::List<dynamic>* list11 = block {
     final core::List<dynamic>* #t189 = <dynamic>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t189.{core::List::add}(dynVar);
+      #t189.{core::List::add}{Invariant}(dynVar);
   } =>#t189;
   core::Set<dynamic>* set11 = block {
     final core::Set<dynamic>* #t190 = col::LinkedHashSet::•<dynamic>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t190.{core::Set::add}(dynVar);
-    #t190.{core::Set::add}(null);
+      #t190.{core::Set::add}{Invariant}(dynVar);
+    #t190.{core::Set::add}{Invariant}(null);
   } =>#t190;
   core::Map<core::String*, dynamic>* map11 = block {
     final core::Map<core::String*, dynamic>* #t191 = <core::String*, dynamic>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t191.{core::Map::[]=}("bar", dynVar);
-    #t191.{core::Map::[]=}("baz", null);
+      #t191.{core::Map::[]=}{Invariant}("bar", dynVar);
+    #t191.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t191;
   core::List<core::List<core::int*>*>* list12 = block {
     final core::List<core::List<core::int*>*>* #t192 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t192.{core::List::add}(<core::int*>[42]);
+      #t192.{core::List::add}{Invariant}(<core::int*>[42]);
   } =>#t192;
   core::Set<core::List<core::int*>*>* set12 = block {
     final core::Set<core::List<core::int*>*>* #t193 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t193.{core::Set::add}(<core::int*>[42]);
-    #t193.{core::Set::add}(null);
+      #t193.{core::Set::add}{Invariant}(<core::int*>[42]);
+    #t193.{core::Set::add}{Invariant}(null);
   } =>#t193;
   core::Map<core::String*, core::List<core::int*>*>* map12 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t194 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t194.{core::Map::[]=}("bar", <core::int*>[42]);
-    #t194.{core::Map::[]=}("baz", null);
+      #t194.{core::Map::[]=}{Invariant}("bar", <core::int*>[42]);
+    #t194.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t194;
   core::List<core::int*>* list20 = block {
     final core::List<core::int*>* #t195 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::int* #t196 in <core::int*>[42])
-        #t195.{core::List::add}(#t196);
+        #t195.{core::List::add}{Invariant}(#t196);
   } =>#t195;
   core::Set<core::int*>* set20 = block {
     final core::Set<core::int*>* #t197 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::int* #t198 in <core::int*>[42])
-        #t197.{core::Set::add}(#t198);
-    #t197.{core::Set::add}(null);
+        #t197.{core::Set::add}{Invariant}(#t198);
+    #t197.{core::Set::add}{Invariant}(null);
   } =>#t197;
   core::Map<core::String*, core::int*>* map20 = block {
     final core::Map<core::String*, core::int*>* #t199 = <core::String*, core::int*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::MapEntry<core::String*, core::int*>* #t200 in <core::String*, core::int*>{"bar": 42}.{core::Map::entries})
-        #t199.{core::Map::[]=}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
-    #t199.{core::Map::[]=}("baz", null);
+        #t199.{core::Map::[]=}{Invariant}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
+    #t199.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t199;
   core::List<dynamic>* list21 = block {
     final core::List<dynamic>* #t201 = <dynamic>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final dynamic #t202 in <dynamic>[dynVar])
-        #t201.{core::List::add}(#t202);
+        #t201.{core::List::add}{Invariant}(#t202);
   } =>#t201;
   core::Set<dynamic>* set21 = block {
     final core::Set<dynamic>* #t203 = col::LinkedHashSet::•<dynamic>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final dynamic #t204 in <dynamic>[dynVar])
-        #t203.{core::Set::add}(#t204);
-    #t203.{core::Set::add}(null);
+        #t203.{core::Set::add}{Invariant}(#t204);
+    #t203.{core::Set::add}{Invariant}(null);
   } =>#t203;
   core::Map<core::String*, dynamic>* map21 = block {
     final core::Map<core::String*, dynamic>* #t205 = <core::String*, dynamic>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::MapEntry<core::String*, dynamic>* #t206 in <core::String*, dynamic>{"bar": dynVar}.{core::Map::entries})
-        #t205.{core::Map::[]=}(#t206.{core::MapEntry::key}, #t206.{core::MapEntry::value});
-    #t205.{core::Map::[]=}("baz", null);
+        #t205.{core::Map::[]=}{Invariant}(#t206.{core::MapEntry::key}, #t206.{core::MapEntry::value});
+    #t205.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t205;
   core::List<core::List<core::int*>*>* list22 = block {
     final core::List<core::List<core::int*>*>* #t207 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t208 in <core::List<core::int*>*>[<core::int*>[42]])
-        #t207.{core::List::add}(#t208);
+        #t207.{core::List::add}{Invariant}(#t208);
   } =>#t207;
   core::Set<core::List<core::int*>*>* set22 = block {
     final core::Set<core::List<core::int*>*>* #t209 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t210 in <core::List<core::int*>*>[<core::int*>[42]])
-        #t209.{core::Set::add}(#t210);
-    #t209.{core::Set::add}(null);
+        #t209.{core::Set::add}{Invariant}(#t210);
+    #t209.{core::Set::add}{Invariant}(null);
   } =>#t209;
   core::Map<core::String*, core::List<core::int*>*>* map22 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t211 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t212 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[42]}.{core::Map::entries})
-        #t211.{core::Map::[]=}(#t212.{core::MapEntry::key}, #t212.{core::MapEntry::value});
-    #t211.{core::Map::[]=}("baz", null);
+        #t211.{core::Map::[]=}{Invariant}(#t212.{core::MapEntry::key}, #t212.{core::MapEntry::value});
+    #t211.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t211;
   core::List<core::int*>* list30 = block {
     final core::List<core::int*>* #t213 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t214 in <core::int*>[42])
-          #t213.{core::List::add}(#t214);
+          #t213.{core::List::add}{Invariant}(#t214);
   } =>#t213;
   core::Set<core::int*>* set30 = block {
     final core::Set<core::int*>* #t215 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t216 in <core::int*>[42])
-          #t215.{core::Set::add}(#t216);
-    #t215.{core::Set::add}(null);
+          #t215.{core::Set::add}{Invariant}(#t216);
+    #t215.{core::Set::add}{Invariant}(null);
   } =>#t215;
   core::Map<core::String*, core::int*>* map30 = block {
     final core::Map<core::String*, core::int*>* #t217 = <core::String*, core::int*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::int*>* #t218 in <core::String*, core::int*>{"bar": 42}.{core::Map::entries})
-          #t217.{core::Map::[]=}(#t218.{core::MapEntry::key}, #t218.{core::MapEntry::value});
-    #t217.{core::Map::[]=}("baz", null);
+          #t217.{core::Map::[]=}{Invariant}(#t218.{core::MapEntry::key}, #t218.{core::MapEntry::value});
+    #t217.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t217;
   core::List<dynamic>* list31 = block {
     final core::List<dynamic>* #t219 = <dynamic>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final dynamic #t220 in <dynamic>[dynVar])
-          #t219.{core::List::add}(#t220);
+          #t219.{core::List::add}{Invariant}(#t220);
   } =>#t219;
   core::Set<dynamic>* set31 = block {
     final core::Set<dynamic>* #t221 = col::LinkedHashSet::•<dynamic>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final dynamic #t222 in <dynamic>[dynVar])
-          #t221.{core::Set::add}(#t222);
-    #t221.{core::Set::add}(null);
+          #t221.{core::Set::add}{Invariant}(#t222);
+    #t221.{core::Set::add}{Invariant}(null);
   } =>#t221;
   core::Map<core::String*, dynamic>* map31 = block {
     final core::Map<core::String*, dynamic>* #t223 = <core::String*, dynamic>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, dynamic>* #t224 in <core::String*, dynamic>{"bar": dynVar}.{core::Map::entries})
-          #t223.{core::Map::[]=}(#t224.{core::MapEntry::key}, #t224.{core::MapEntry::value});
-    #t223.{core::Map::[]=}("baz", null);
+          #t223.{core::Map::[]=}{Invariant}(#t224.{core::MapEntry::key}, #t224.{core::MapEntry::value});
+    #t223.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t223;
   core::List<core::List<core::int*>*>* list33 = block {
     final core::List<core::List<core::int*>*>* #t225 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t226 in <core::List<core::int*>*>[<core::int*>[42]])
-          #t225.{core::List::add}(#t226);
+          #t225.{core::List::add}{Invariant}(#t226);
   } =>#t225;
   core::Set<core::List<core::int*>*>* set33 = block {
     final core::Set<core::List<core::int*>*>* #t227 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t228 in <core::List<core::int*>*>[<core::int*>[42]])
-          #t227.{core::Set::add}(#t228);
-    #t227.{core::Set::add}(null);
+          #t227.{core::Set::add}{Invariant}(#t228);
+    #t227.{core::Set::add}{Invariant}(null);
   } =>#t227;
   core::Map<core::String*, core::List<core::int*>*>* map33 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t229 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t230 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[42]}.{core::Map::entries})
-          #t229.{core::Map::[]=}(#t230.{core::MapEntry::key}, #t230.{core::MapEntry::value});
-    #t229.{core::Map::[]=}("baz", null);
+          #t229.{core::Map::[]=}{Invariant}(#t230.{core::MapEntry::key}, #t230.{core::MapEntry::value});
+    #t229.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t229;
   core::List<core::List<core::int*>*>* list40 = block {
     final core::List<core::List<core::int*>*>* #t231 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t232 in <core::List<core::int*>*>[<core::int*>[]])
-        #t231.{core::List::add}(#t232);
+        #t231.{core::List::add}{Invariant}(#t232);
   } =>#t231;
   core::Set<core::List<core::int*>*>* set40 = block {
     final core::Set<core::List<core::int*>*>* #t233 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t234 in <core::List<core::int*>*>[<core::int*>[]])
-        #t233.{core::Set::add}(#t234);
-    #t233.{core::Set::add}(null);
+        #t233.{core::Set::add}{Invariant}(#t234);
+    #t233.{core::Set::add}{Invariant}(null);
   } =>#t233;
   core::Map<core::String*, core::List<core::int*>*>* map40 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t235 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t236 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries})
-        #t235.{core::Map::[]=}(#t236.{core::MapEntry::key}, #t236.{core::MapEntry::value});
-    #t235.{core::Map::[]=}("baz", null);
+        #t235.{core::Map::[]=}{Invariant}(#t236.{core::MapEntry::key}, #t236.{core::MapEntry::value});
+    #t235.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t235;
   core::List<core::List<core::int*>*>* list41 = block {
     final core::List<core::List<core::int*>*>* #t237 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t238 in block {
         final core::Set<core::List<core::int*>*>* #t239 = col::LinkedHashSet::•<core::List<core::int*>*>();
-        #t239.{core::Set::add}(<core::int*>[]);
+        #t239.{core::Set::add}{Invariant}(<core::int*>[]);
       } =>#t239)
-        #t237.{core::List::add}(#t238);
+        #t237.{core::List::add}{Invariant}(#t238);
   } =>#t237;
   core::Set<core::List<core::int*>*>* set41 = block {
     final core::Set<core::List<core::int*>*>* #t240 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t241 in block {
         final core::Set<core::List<core::int*>*>* #t242 = col::LinkedHashSet::•<core::List<core::int*>*>();
-        #t242.{core::Set::add}(<core::int*>[]);
+        #t242.{core::Set::add}{Invariant}(<core::int*>[]);
       } =>#t242)
-        #t240.{core::Set::add}(#t241);
-    #t240.{core::Set::add}(null);
+        #t240.{core::Set::add}{Invariant}(#t241);
+    #t240.{core::Set::add}{Invariant}(null);
   } =>#t240;
   core::List<core::List<core::int*>*>* list42 = block {
     final core::List<core::List<core::int*>*>* #t243 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t244 in <core::List<core::int*>*>[<core::int*>[]])
-          #t243.{core::List::add}(#t244);
+          #t243.{core::List::add}{Invariant}(#t244);
   } =>#t243;
   core::Set<core::List<core::int*>*>* set42 = block {
     final core::Set<core::List<core::int*>*>* #t245 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t246 in <core::List<core::int*>*>[<core::int*>[]])
-          #t245.{core::Set::add}(#t246);
-    #t245.{core::Set::add}(null);
+          #t245.{core::Set::add}{Invariant}(#t246);
+    #t245.{core::Set::add}{Invariant}(null);
   } =>#t245;
   core::Map<core::String*, core::List<core::int*>*>* map42 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t247 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t248 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries})
-          #t247.{core::Map::[]=}(#t248.{core::MapEntry::key}, #t248.{core::MapEntry::value});
-    #t247.{core::Map::[]=}("baz", null);
+          #t247.{core::Map::[]=}{Invariant}(#t248.{core::MapEntry::key}, #t248.{core::MapEntry::value});
+    #t247.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t247;
   core::List<core::int*>* list50 = block {
     final core::List<core::int*>* #t249 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::int* #t250 in <core::int*>[])
-        #t249.{core::List::add}(#t250);
+        #t249.{core::List::add}{Invariant}(#t250);
   } =>#t249;
   core::Set<core::int*>* set50 = block {
     final core::Set<core::int*>* #t251 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::int* #t252 in <core::int*>[])
-        #t251.{core::Set::add}(#t252);
-    #t251.{core::Set::add}(null);
+        #t251.{core::Set::add}{Invariant}(#t252);
+    #t251.{core::Set::add}{Invariant}(null);
   } =>#t251;
   core::Map<core::String*, core::int*>* map50 = block {
     final core::Map<core::String*, core::int*>* #t253 = <core::String*, core::int*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::MapEntry<core::String*, core::int*>* #t254 in <core::String*, core::int*>{}.{core::Map::entries})
-        #t253.{core::Map::[]=}(#t254.{core::MapEntry::key}, #t254.{core::MapEntry::value});
-    #t253.{core::Map::[]=}("baz", null);
+        #t253.{core::Map::[]=}{Invariant}(#t254.{core::MapEntry::key}, #t254.{core::MapEntry::value});
+    #t253.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t253;
   core::List<core::int*>* list51 = block {
     final core::List<core::int*>* #t255 = <core::int*>[];
@@ -1503,7 +1503,7 @@
       for (final core::int* #t256 in block {
         final core::Set<core::int*>* #t257 = col::LinkedHashSet::•<core::int*>();
       } =>#t257)
-        #t255.{core::List::add}(#t256);
+        #t255.{core::List::add}{Invariant}(#t256);
   } =>#t255;
   core::Set<core::int*>* set51 = block {
     final core::Set<core::int*>* #t258 = col::LinkedHashSet::•<core::int*>();
@@ -1511,246 +1511,246 @@
       for (final core::int* #t259 in block {
         final core::Set<core::int*>* #t260 = col::LinkedHashSet::•<core::int*>();
       } =>#t260)
-        #t258.{core::Set::add}(#t259);
-    #t258.{core::Set::add}(null);
+        #t258.{core::Set::add}{Invariant}(#t259);
+    #t258.{core::Set::add}{Invariant}(null);
   } =>#t258;
   core::List<core::int*>* list52 = block {
     final core::List<core::int*>* #t261 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t262 in <core::int*>[])
-          #t261.{core::List::add}(#t262);
+          #t261.{core::List::add}{Invariant}(#t262);
   } =>#t261;
   core::Set<core::int*>* set52 = block {
     final core::Set<core::int*>* #t263 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t264 in <core::int*>[])
-          #t263.{core::Set::add}(#t264);
-    #t263.{core::Set::add}(null);
+          #t263.{core::Set::add}{Invariant}(#t264);
+    #t263.{core::Set::add}{Invariant}(null);
   } =>#t263;
   core::List<core::List<core::int*>*>* list60 = block {
     final core::List<core::List<core::int*>*>* #t265 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t266 in <core::List<core::int*>*>[<core::int*>[]])
-        #t265.{core::List::add}(#t266);
+        #t265.{core::List::add}{Invariant}(#t266);
   } =>#t265;
   core::Set<core::List<core::int*>*>* set60 = block {
     final core::Set<core::List<core::int*>*>* #t267 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t268 in <core::List<core::int*>*>[<core::int*>[]])
-        #t267.{core::Set::add}(#t268);
-    #t267.{core::Set::add}(null);
+        #t267.{core::Set::add}{Invariant}(#t268);
+    #t267.{core::Set::add}{Invariant}(null);
   } =>#t267;
   core::Map<core::String*, core::List<core::int*>*>* map60 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t269 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t270 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries})
-        #t269.{core::Map::[]=}(#t270.{core::MapEntry::key}, #t270.{core::MapEntry::value});
-    #t269.{core::Map::[]=}("baz", null);
+        #t269.{core::Map::[]=}{Invariant}(#t270.{core::MapEntry::key}, #t270.{core::MapEntry::value});
+    #t269.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t269;
   core::List<core::List<core::int*>*>* list61 = block {
     final core::List<core::List<core::int*>*>* #t271 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t272 in <core::List<core::int*>*>[<core::int*>[]])
-          #t271.{core::List::add}(#t272);
+          #t271.{core::List::add}{Invariant}(#t272);
   } =>#t271;
   core::Set<core::List<core::int*>*>* set61 = block {
     final core::Set<core::List<core::int*>*>* #t273 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t274 in <core::List<core::int*>*>[<core::int*>[]])
-          #t273.{core::Set::add}(#t274);
-    #t273.{core::Set::add}(null);
+          #t273.{core::Set::add}{Invariant}(#t274);
+    #t273.{core::Set::add}{Invariant}(null);
   } =>#t273;
   core::Map<core::String*, core::List<core::int*>*>* map61 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t275 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t276 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries})
-          #t275.{core::Map::[]=}(#t276.{core::MapEntry::key}, #t276.{core::MapEntry::value});
-    #t275.{core::Map::[]=}("baz", null);
+          #t275.{core::Map::[]=}{Invariant}(#t276.{core::MapEntry::key}, #t276.{core::MapEntry::value});
+    #t275.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t275;
   core::List<core::List<core::int*>*>* list70 = block {
     final core::List<core::List<core::int*>*>* #t277 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t277.{core::List::add}(<core::int*>[]);
+      #t277.{core::List::add}{Invariant}(<core::int*>[]);
   } =>#t277;
   core::Set<core::List<core::int*>*>* set70 = block {
     final core::Set<core::List<core::int*>*>* #t278 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t278.{core::Set::add}(<core::int*>[]);
-    #t278.{core::Set::add}(null);
+      #t278.{core::Set::add}{Invariant}(<core::int*>[]);
+    #t278.{core::Set::add}{Invariant}(null);
   } =>#t278;
   core::Map<core::String*, core::List<core::int*>*>* map70 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t279 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t279.{core::Map::[]=}("bar", <core::int*>[]);
-    #t279.{core::Map::[]=}("baz", null);
+      #t279.{core::Map::[]=}{Invariant}("bar", <core::int*>[]);
+    #t279.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t279;
   core::List<core::List<core::int*>*>* list71 = block {
     final core::List<core::List<core::int*>*>* #t280 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t280.{core::List::add}(<core::int*>[]);
+        #t280.{core::List::add}{Invariant}(<core::int*>[]);
   } =>#t280;
   core::Set<core::List<core::int*>*>* set71 = block {
     final core::Set<core::List<core::int*>*>* #t281 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t281.{core::Set::add}(<core::int*>[]);
-    #t281.{core::Set::add}(null);
+        #t281.{core::Set::add}{Invariant}(<core::int*>[]);
+    #t281.{core::Set::add}{Invariant}(null);
   } =>#t281;
   core::Map<core::String*, core::List<core::int*>*>* map71 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t282 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t282.{core::Map::[]=}("bar", <core::int*>[]);
-    #t282.{core::Map::[]=}("baz", null);
+        #t282.{core::Map::[]=}{Invariant}("bar", <core::int*>[]);
+    #t282.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t282;
   core::List<core::num*>* list80 = block {
     final core::List<core::num*>* #t283 = <core::num*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t283.{core::List::add}(42);
+        #t283.{core::List::add}{Invariant}(42);
       else
-        #t283.{core::List::add}(3.14);
+        #t283.{core::List::add}{Invariant}(3.14);
   } =>#t283;
   core::Set<core::num*>* set80 = block {
     final core::Set<core::num*>* #t284 = col::LinkedHashSet::•<core::num*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t284.{core::Set::add}(42);
+        #t284.{core::Set::add}{Invariant}(42);
       else
-        #t284.{core::Set::add}(3.14);
-    #t284.{core::Set::add}(null);
+        #t284.{core::Set::add}{Invariant}(3.14);
+    #t284.{core::Set::add}{Invariant}(null);
   } =>#t284;
   core::Map<core::String*, core::num*>* map80 = block {
     final core::Map<core::String*, core::num*>* #t285 = <core::String*, core::num*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t285.{core::Map::[]=}("bar", 42);
+        #t285.{core::Map::[]=}{Invariant}("bar", 42);
       else
-        #t285.{core::Map::[]=}("bar", 3.14);
-    #t285.{core::Map::[]=}("baz", null);
+        #t285.{core::Map::[]=}{Invariant}("bar", 3.14);
+    #t285.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t285;
   core::List<core::num*>* list81 = block {
     final core::List<core::num*>* #t286 = <core::num*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::num* #t287 in listInt)
-          #t286.{core::List::add}(#t287);
+          #t286.{core::List::add}{Invariant}(#t287);
       else
         for (final core::num* #t288 in listDouble)
-          #t286.{core::List::add}(#t288);
+          #t286.{core::List::add}{Invariant}(#t288);
   } =>#t286;
   core::Set<core::num*>* set81 = block {
     final core::Set<core::num*>* #t289 = col::LinkedHashSet::•<core::num*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::num* #t290 in listInt)
-          #t289.{core::Set::add}(#t290);
+          #t289.{core::Set::add}{Invariant}(#t290);
       else
         for (final core::num* #t291 in listDouble)
-          #t289.{core::Set::add}(#t291);
-    #t289.{core::Set::add}(null);
+          #t289.{core::Set::add}{Invariant}(#t291);
+    #t289.{core::Set::add}{Invariant}(null);
   } =>#t289;
   core::Map<core::String*, core::num*>* map81 = block {
     final core::Map<core::String*, core::num*>* #t292 = <core::String*, core::num*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::num*>* #t293 in mapStringInt.{core::Map::entries})
-          #t292.{core::Map::[]=}(#t293.{core::MapEntry::key}, #t293.{core::MapEntry::value});
+          #t292.{core::Map::[]=}{Invariant}(#t293.{core::MapEntry::key}, #t293.{core::MapEntry::value});
       else
         for (final core::MapEntry<core::String*, core::num*>* #t294 in mapStringDouble.{core::Map::entries})
-          #t292.{core::Map::[]=}(#t294.{core::MapEntry::key}, #t294.{core::MapEntry::value});
-    #t292.{core::Map::[]=}("baz", null);
+          #t292.{core::Map::[]=}{Invariant}(#t294.{core::MapEntry::key}, #t294.{core::MapEntry::value});
+    #t292.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t292;
   core::List<dynamic>* list82 = block {
     final core::List<dynamic>* #t295 = <dynamic>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final dynamic #t296 in listInt)
-          #t295.{core::List::add}(#t296);
+          #t295.{core::List::add}{Invariant}(#t296);
       else
         for (final dynamic #t297 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-          #t295.{core::List::add}(#t297);
+          #t295.{core::List::add}{Invariant}(#t297);
   } =>#t295;
   core::Set<dynamic>* set82 = block {
     final core::Set<dynamic>* #t298 = col::LinkedHashSet::•<dynamic>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final dynamic #t299 in listInt)
-          #t298.{core::Set::add}(#t299);
+          #t298.{core::Set::add}{Invariant}(#t299);
       else
         for (final dynamic #t300 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-          #t298.{core::Set::add}(#t300);
-    #t298.{core::Set::add}(null);
+          #t298.{core::Set::add}{Invariant}(#t300);
+    #t298.{core::Set::add}{Invariant}(null);
   } =>#t298;
   core::Map<dynamic, dynamic>* map82 = block {
     final core::Map<dynamic, dynamic>* #t301 = <dynamic, dynamic>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<dynamic, dynamic>* #t302 in mapStringInt.{core::Map::entries})
-          #t301.{core::Map::[]=}(#t302.{core::MapEntry::key}, #t302.{core::MapEntry::value});
+          #t301.{core::Map::[]=}{Invariant}(#t302.{core::MapEntry::key}, #t302.{core::MapEntry::value});
       else
         for (final core::MapEntry<dynamic, dynamic>* #t303 in (dynVar as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries})
-          #t301.{core::Map::[]=}(#t303.{core::MapEntry::key}, #t303.{core::MapEntry::value});
-    #t301.{core::Map::[]=}("baz", null);
+          #t301.{core::Map::[]=}{Invariant}(#t303.{core::MapEntry::key}, #t303.{core::MapEntry::value});
+    #t301.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t301;
   core::List<core::num*>* list83 = block {
     final core::List<core::num*>* #t304 = <core::num*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t304.{core::List::add}(42);
+        #t304.{core::List::add}{Invariant}(42);
       else
         for (final core::num* #t305 in listDouble)
-          #t304.{core::List::add}(#t305);
+          #t304.{core::List::add}{Invariant}(#t305);
   } =>#t304;
   core::Set<core::num*>* set83 = block {
     final core::Set<core::num*>* #t306 = col::LinkedHashSet::•<core::num*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::num* #t307 in listInt)
-          #t306.{core::Set::add}(#t307);
+          #t306.{core::Set::add}{Invariant}(#t307);
       else
-        #t306.{core::Set::add}(3.14);
-    #t306.{core::Set::add}(null);
+        #t306.{core::Set::add}{Invariant}(3.14);
+    #t306.{core::Set::add}{Invariant}(null);
   } =>#t306;
   core::Map<core::String*, core::num*>* map83 = block {
     final core::Map<core::String*, core::num*>* #t308 = <core::String*, core::num*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::num*>* #t309 in mapStringInt.{core::Map::entries})
-          #t308.{core::Map::[]=}(#t309.{core::MapEntry::key}, #t309.{core::MapEntry::value});
+          #t308.{core::Map::[]=}{Invariant}(#t309.{core::MapEntry::key}, #t309.{core::MapEntry::value});
       else
-        #t308.{core::Map::[]=}("bar", 3.14);
-    #t308.{core::Map::[]=}("baz", null);
+        #t308.{core::Map::[]=}{Invariant}("bar", 3.14);
+    #t308.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t308;
   core::List<core::int*>* list90 = block {
     final core::List<core::int*>* #t310 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t310.{core::List::add}(dynVar as{TypeError,ForDynamic} core::int*);
+      #t310.{core::List::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*);
   } =>#t310;
   core::Set<core::int*>* set90 = block {
     final core::Set<core::int*>* #t311 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t311.{core::Set::add}(dynVar as{TypeError,ForDynamic} core::int*);
-    #t311.{core::Set::add}(null);
+      #t311.{core::Set::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*);
+    #t311.{core::Set::add}{Invariant}(null);
   } =>#t311;
   core::Map<core::String*, core::int*>* map90 = block {
     final core::Map<core::String*, core::int*>* #t312 = <core::String*, core::int*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t312.{core::Map::[]=}("bar", dynVar as{TypeError,ForDynamic} core::int*);
-    #t312.{core::Map::[]=}("baz", null);
+      #t312.{core::Map::[]=}{Invariant}("bar", dynVar as{TypeError,ForDynamic} core::int*);
+    #t312.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t312;
   core::List<core::int*>* list91 = block {
     final core::List<core::int*>* #t313 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final dynamic #t314 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*) {
         final core::int* #t315 = #t314 as{TypeError} core::int*;
-        #t313.{core::List::add}(#t315);
+        #t313.{core::List::add}{Invariant}(#t315);
       }
   } =>#t313;
   core::Set<core::int*>* set91 = block {
@@ -1758,9 +1758,9 @@
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final dynamic #t317 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*) {
         final core::int* #t318 = #t317 as{TypeError} core::int*;
-        #t316.{core::Set::add}(#t318);
+        #t316.{core::Set::add}{Invariant}(#t318);
       }
-    #t316.{core::Set::add}(null);
+    #t316.{core::Set::add}{Invariant}(null);
   } =>#t316;
   core::Map<core::String*, core::int*>* map91 = block {
     final core::Map<core::String*, core::int*>* #t319 = <core::String*, core::int*>{};
@@ -1768,100 +1768,100 @@
       for (final core::MapEntry<dynamic, dynamic>* #t320 in (dynVar as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries}) {
         final core::String* #t321 = #t320.{core::MapEntry::key} as{TypeError} core::String*;
         final core::int* #t322 = #t320.{core::MapEntry::value} as{TypeError} core::int*;
-        #t319.{core::Map::[]=}(#t321, #t322);
+        #t319.{core::Map::[]=}{Invariant}(#t321, #t322);
       }
-    #t319.{core::Map::[]=}("baz", null);
+    #t319.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t319;
   core::List<core::int*>* list100 = block {
     final core::List<core::int*>* #t323 = <core::int*>[];
     for (final core::int* #t324 = index = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; index = index.{core::num::+}(1))
-      #t323.{core::List::add}(42);
+      #t323.{core::List::add}{Invariant}(42);
   } =>#t323;
   core::Set<core::int*>* set100 = block {
     final core::Set<core::int*>* #t325 = col::LinkedHashSet::•<core::int*>();
     for (final core::int* #t326 = index = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; index = index.{core::num::+}(1))
-      #t325.{core::Set::add}(42);
+      #t325.{core::Set::add}{Invariant}(42);
   } =>#t325;
   core::Map<core::String*, core::int*>* map100 = block {
     final core::Map<core::String*, core::int*>* #t327 = <core::String*, core::int*>{};
     for (final core::int* #t328 = index = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; index = index.{core::num::+}(1))
-      #t327.{core::Map::[]=}("bar", 42);
+      #t327.{core::Map::[]=}{Invariant}("bar", 42);
   } =>#t327;
   core::List<core::int*>* list110 = block {
     final core::List<core::int*>* #t329 = <core::int*>[];
     for (core::int* i in <core::int*>[1, 2, 3])
-      #t329.{core::List::add}(i);
+      #t329.{core::List::add}{Invariant}(i);
   } =>#t329;
   core::Set<core::int*>* set110 = block {
     final core::Set<core::int*>* #t330 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i in <core::int*>[1, 2, 3])
-      #t330.{core::Set::add}(i);
-    #t330.{core::Set::add}(null);
+      #t330.{core::Set::add}{Invariant}(i);
+    #t330.{core::Set::add}{Invariant}(null);
   } =>#t330;
   core::Map<core::String*, core::int*>* map110 = block {
     final core::Map<core::String*, core::int*>* #t331 = <core::String*, core::int*>{};
     for (core::int* i in <core::int*>[1, 2, 3])
-      #t331.{core::Map::[]=}("bar", i);
-    #t331.{core::Map::[]=}("baz", null);
+      #t331.{core::Map::[]=}{Invariant}("bar", i);
+    #t331.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t331;
   core::List<core::int*>* list120 = block {
     final core::List<core::int*>* #t332 = <core::int*>[];
     for (dynamic i in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-      #t332.{core::List::add}(i as{TypeError,ForDynamic} core::int*);
+      #t332.{core::List::add}{Invariant}(i as{TypeError,ForDynamic} core::int*);
   } =>#t332;
   core::Set<core::int*>* set120 = block {
     final core::Set<core::int*>* #t333 = col::LinkedHashSet::•<core::int*>();
     for (dynamic i in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-      #t333.{core::Set::add}(i as{TypeError,ForDynamic} core::int*);
-    #t333.{core::Set::add}(null);
+      #t333.{core::Set::add}{Invariant}(i as{TypeError,ForDynamic} core::int*);
+    #t333.{core::Set::add}{Invariant}(null);
   } =>#t333;
   core::Map<core::String*, core::int*>* map120 = block {
     final core::Map<core::String*, core::int*>* #t334 = <core::String*, core::int*>{};
     for (dynamic i in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-      #t334.{core::Map::[]=}("bar", i as{TypeError,ForDynamic} core::int*);
-    #t334.{core::Map::[]=}("baz", null);
+      #t334.{core::Map::[]=}{Invariant}("bar", i as{TypeError,ForDynamic} core::int*);
+    #t334.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t334;
   core::List<core::int*>* list130 = block {
     final core::List<core::int*>* #t335 = <core::int*>[];
     for (core::int* i = 1; i.{core::num::<}(2); i = i.{core::num::+}(1))
-      #t335.{core::List::add}(i);
+      #t335.{core::List::add}{Invariant}(i);
   } =>#t335;
   core::Set<core::int*>* set130 = block {
     final core::Set<core::int*>* #t336 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 1; i.{core::num::<}(2); i = i.{core::num::+}(1))
-      #t336.{core::Set::add}(i);
+      #t336.{core::Set::add}{Invariant}(i);
   } =>#t336;
   core::Map<core::int*, core::int*>* map130 = block {
     final core::Map<core::int*, core::int*>* #t337 = <core::int*, core::int*>{};
     for (core::int* i = 1; i.{core::num::<}(2); i = i.{core::num::+}(1))
-      #t337.{core::Map::[]=}(i, i);
+      #t337.{core::Map::[]=}{Invariant}(i, i);
   } =>#t337;
 }
 static method testForElementErrors(core::Map<core::int*, core::int*>* map, core::List<core::int*>* list) → dynamic async {
   block {
     final core::List<core::int*>* #t338 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t338.{core::List::add}(let final<BottomType> #t339 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:210:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+      #t338.{core::List::add}{Invariant}(let final<BottomType> #t339 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:210:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>[for (int i = 0; oracle(\"foo\"); i++) \"bar\"];
                                             ^" in "bar" as{TypeError} core::int*);
   } =>#t338;
   block {
     final core::Set<core::int*>* #t340 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t340.{core::Set::add}(let final<BottomType> #t341 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:211:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+      #t340.{core::Set::add}{Invariant}(let final<BottomType> #t341 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:211:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\", null};
                                             ^" in "bar" as{TypeError} core::int*);
-    #t340.{core::Set::add}(null);
+    #t340.{core::Set::add}{Invariant}(null);
   } =>#t340;
   block {
     final core::Map<core::int*, core::int*>* #t342 = <core::int*, core::int*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t342.{core::Map::[]=}(let final<BottomType> #t343 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:212:50: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+      #t342.{core::Map::[]=}{Invariant}(let final<BottomType> #t343 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:212:50: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
                                                  ^" in "bar" as{TypeError} core::int*, let final<BottomType> #t344 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:212:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
                                                         ^" in "bar" as{TypeError} core::int*);
-    #t342.{core::Map::[]=}(let final<BottomType> #t345 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:212:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+    #t342.{core::Map::[]=}{Invariant}(let final<BottomType> #t345 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:212:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
                                                                ^" in "baz" as{TypeError} core::int*, null);
   } =>#t342;
@@ -1871,7 +1871,7 @@
       for (final core::int* #t347 in <core::int*>[let final<BottomType> #t348 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:213:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>[for (int i = 0; oracle(\"foo\"); i++) ...[\"bar\"]];
                                                 ^" in "bar" as{TypeError} core::int*])
-        #t346.{core::List::add}(#t347);
+        #t346.{core::List::add}{Invariant}(#t347);
   } =>#t346;
   block {
     final core::Set<core::int*>* #t349 = col::LinkedHashSet::•<core::int*>();
@@ -1879,8 +1879,8 @@
       for (final core::int* #t350 in <core::int*>[let final<BottomType> #t351 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:214:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>{for (int i = 0; oracle(\"foo\"); i++) ...[\"bar\"], null};
                                                 ^" in "bar" as{TypeError} core::int*])
-        #t349.{core::Set::add}(#t350);
-    #t349.{core::Set::add}(null);
+        #t349.{core::Set::add}{Invariant}(#t350);
+    #t349.{core::Set::add}{Invariant}(null);
   } =>#t349;
   block {
     final core::Map<core::int*, core::int*>* #t352 = <core::int*, core::int*>{};
@@ -1890,15 +1890,15 @@
                                                      ^" in "bar" as{TypeError} core::int*: let final<BottomType> #t355 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:215:61: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
                                                             ^" in "bar" as{TypeError} core::int*}.{core::Map::entries})
-        #t352.{core::Map::[]=}(#t353.{core::MapEntry::key}, #t353.{core::MapEntry::value});
-    #t352.{core::Map::[]=}(let final<BottomType> #t356 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:215:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+        #t352.{core::Map::[]=}{Invariant}(#t353.{core::MapEntry::key}, #t353.{core::MapEntry::value});
+    #t352.{core::Map::[]=}{Invariant}(let final<BottomType> #t356 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:215:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
                                                                     ^" in "baz" as{TypeError} core::int*, null);
   } =>#t352;
   block {
     final core::List<core::int*>* #t357 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t357.{core::List::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:216:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t357.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:216:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[for (int i = 0; oracle(\"foo\"); i++) ...map];
                                                ^");
@@ -1906,11 +1906,11 @@
   block {
     final core::Set<core::int*>* #t358 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t358.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:217:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t358.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:217:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{for (int i = 0; oracle(\"foo\"); i++) ...map, null};
                                                ^");
-    #t358.{core::Set::add}(null);
+    #t358.{core::Set::add}{Invariant}(null);
   } =>#t358;
   <core::int*, core::int*>{invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:218:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -1923,11 +1923,11 @@
     final core::List<core::String*>* #t359 = <core::String*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t359.{core::List::add}(let final<BottomType> #t360 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:219:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+        #t359.{core::List::add}{Invariant}(let final<BottomType> #t360 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:219:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14];
                                                              ^" in 42 as{TypeError} core::String*);
       else
-        #t359.{core::List::add}(let final<BottomType> #t361 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:219:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+        #t359.{core::List::add}{Invariant}(let final<BottomType> #t361 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:219:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14];
                                                                      ^" in 3.14 as{TypeError} core::String*);
   } =>#t359;
@@ -1935,50 +1935,50 @@
     final core::Set<core::String*>* #t362 = col::LinkedHashSet::•<core::String*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t362.{core::Set::add}(let final<BottomType> #t363 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:220:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+        #t362.{core::Set::add}{Invariant}(let final<BottomType> #t363 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:220:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14, null};
                                                              ^" in 42 as{TypeError} core::String*);
       else
-        #t362.{core::Set::add}(let final<BottomType> #t364 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:220:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+        #t362.{core::Set::add}{Invariant}(let final<BottomType> #t364 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:220:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14, null};
                                                                      ^" in 3.14 as{TypeError} core::String*);
-    #t362.{core::Set::add}(null);
+    #t362.{core::Set::add}{Invariant}(null);
   } =>#t362;
   block {
     final core::Map<core::String*, core::String*>* #t365 = <core::String*, core::String*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t365.{core::Map::[]=}("bar", let final<BottomType> #t366 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:221:77: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+        #t365.{core::Map::[]=}{Invariant}("bar", let final<BottomType> #t366 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:221:77: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String, String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else \"bar\": 3.14, \"baz\": null};
                                                                             ^" in 42 as{TypeError} core::String*);
       else
-        #t365.{core::Map::[]=}("bar", let final<BottomType> #t367 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:221:92: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+        #t365.{core::Map::[]=}{Invariant}("bar", let final<BottomType> #t367 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:221:92: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String, String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else \"bar\": 3.14, \"baz\": null};
                                                                                            ^" in 3.14 as{TypeError} core::String*);
-    #t365.{core::Map::[]=}("baz", null);
+    #t365.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t365;
   block {
     final core::List<core::int*>* #t368 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t368.{core::List::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:222:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+        #t368.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:222:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...map else 42];
                                                              ^");
       else
-        #t368.{core::List::add}(42);
+        #t368.{core::List::add}{Invariant}(42);
   } =>#t368;
   block {
     final core::Set<core::int*>* #t369 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t369.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:223:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+        #t369.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:223:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...map else 42, null};
                                                              ^");
       else
-        #t369.{core::Set::add}(42);
-    #t369.{core::Set::add}(null);
+        #t369.{core::Set::add}{Invariant}(42);
+    #t369.{core::Set::add}{Invariant}(null);
   } =>#t369;
   <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:224:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -1991,9 +1991,9 @@
     final core::List<core::int*>* #t370 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t370.{core::List::add}(42);
+        #t370.{core::List::add}{Invariant}(42);
       else
-        #t370.{core::List::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:225:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+        #t370.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:225:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else ...map];
                                                                      ^");
@@ -2002,13 +2002,13 @@
     final core::Set<core::int*>* #t371 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t371.{core::Set::add}(42);
+        #t371.{core::Set::add}{Invariant}(42);
       else
-        #t371.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:226:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+        #t371.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:226:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else ...map, null};
                                                                      ^");
-    #t371.{core::Set::add}(null);
+    #t371.{core::Set::add}{Invariant}(null);
   } =>#t371;
   <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:227:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -2024,7 +2024,7 @@
       invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:230:14: Error: Can't assign to the final variable 'i'.
   <int>[for (i in <int>[1]) i];
              ^";
-      #t372.{core::List::add}(i);
+      #t372.{core::List::add}{Invariant}(i);
     }
   } =>#t372;
   block {
@@ -2033,9 +2033,9 @@
       invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:231:14: Error: Can't assign to the final variable 'i'.
   <int>{for (i in <int>[1]) i, null};
              ^";
-      #t374.{core::Set::add}(i);
+      #t374.{core::Set::add}{Invariant}(i);
     }
-    #t374.{core::Set::add}(null);
+    #t374.{core::Set::add}{Invariant}(null);
   } =>#t374;
   block {
     final core::Map<core::String*, core::int*>* #t376 = <core::String*, core::int*>{};
@@ -2043,9 +2043,9 @@
       invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:232:21: Error: Can't assign to the final variable 'i'.
 \t<String, int>{for (i in <int>[1]) \"bar\": i, \"baz\": null};
 \t                   ^";
-      #t376.{core::Map::[]=}("bar", i);
+      #t376.{core::Map::[]=}{Invariant}("bar", i);
     }
-    #t376.{core::Map::[]=}("baz", null);
+    #t376.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t376;
   core::List<dynamic>* list10 = block {
     final core::List<dynamic>* #t378 = <dynamic>[];
@@ -2053,7 +2053,7 @@
  - 'Iterable' is from 'dart:core'.
   var list10 = [for (var i in \"not iterable\") i];
                               ^" in "not iterable" as{TypeError} core::Iterable<dynamic>*)
-      #t378.{core::List::add}(i);
+      #t378.{core::List::add}{Invariant}(i);
   } =>#t378;
   core::Set<dynamic>* set10 = block {
     final core::Set<dynamic>* #t380 = col::LinkedHashSet::•<dynamic>();
@@ -2061,8 +2061,8 @@
  - 'Iterable' is from 'dart:core'.
   var set10 = {for (var i in \"not iterable\") i, null};
                              ^" in "not iterable" as{TypeError} core::Iterable<dynamic>*)
-      #t380.{core::Set::add}(i);
-    #t380.{core::Set::add}(null);
+      #t380.{core::Set::add}{Invariant}(i);
+    #t380.{core::Set::add}{Invariant}(null);
   } =>#t380;
   core::Map<core::String*, dynamic>* map10 = block {
     final core::Map<core::String*, dynamic>* #t382 = <core::String*, dynamic>{};
@@ -2070,8 +2070,8 @@
  - 'Iterable' is from 'dart:core'.
   var map10 = {for (var i in \"not iterable\") \"bar\": i, \"baz\": null};
                              ^" in "not iterable" as{TypeError} core::Iterable<dynamic>*)
-      #t382.{core::Map::[]=}("bar", i);
-    #t382.{core::Map::[]=}("baz", null);
+      #t382.{core::Map::[]=}{Invariant}("bar", i);
+    #t382.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t382;
   core::List<core::int*>* list20 = block {
     final core::List<core::int*>* #t384 = <core::int*>[];
@@ -2080,7 +2080,7 @@
                                ^" in "not" as{TypeError} core::int*, let final<BottomType> #t386 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:237:39: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   var list20 = [for (int i in [\"not\", \"int\"]) i];
                                       ^" in "int" as{TypeError} core::int*])
-      #t384.{core::List::add}(i);
+      #t384.{core::List::add}{Invariant}(i);
   } =>#t384;
   core::Set<core::int*>* set20 = block {
     final core::Set<core::int*>* #t387 = col::LinkedHashSet::•<core::int*>();
@@ -2089,8 +2089,8 @@
                               ^" in "not" as{TypeError} core::int*, let final<BottomType> #t389 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:238:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   var set20 = {for (int i in [\"not\", \"int\"]) i, null};
                                      ^" in "int" as{TypeError} core::int*])
-      #t387.{core::Set::add}(i);
-    #t387.{core::Set::add}(null);
+      #t387.{core::Set::add}{Invariant}(i);
+    #t387.{core::Set::add}{Invariant}(null);
   } =>#t387;
   core::Map<core::String*, core::int*>* map20 = block {
     final core::Map<core::String*, core::int*>* #t390 = <core::String*, core::int*>{};
@@ -2099,8 +2099,8 @@
                               ^" in "not" as{TypeError} core::int*, let final<BottomType> #t392 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:239:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   var map20 = {for (int i in [\"not\", \"int\"]) \"bar\": i, \"baz\": null};
                                      ^" in "int" as{TypeError} core::int*])
-      #t390.{core::Map::[]=}("bar", i);
-    #t390.{core::Map::[]=}("baz", null);
+      #t390.{core::Map::[]=}{Invariant}("bar", i);
+    #t390.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t390;
   core::List<dynamic>* list30 = block {
     final core::List<dynamic>* #t393 = <dynamic>[];
@@ -2108,7 +2108,7 @@
  - 'Stream' is from 'dart:async'.
   var list30 = [await for (var i in \"not stream\") i];
                                     ^" in "not stream" as{TypeError} asy::Stream<dynamic>*)
-      #t393.{core::List::add}(i);
+      #t393.{core::List::add}{Invariant}(i);
   } =>#t393;
   core::Set<dynamic>* set30 = block {
     final core::Set<dynamic>* #t395 = col::LinkedHashSet::•<dynamic>();
@@ -2116,8 +2116,8 @@
  - 'Stream' is from 'dart:async'.
   var set30 = {await for (var i in \"not stream\") i, null};
                                    ^" in "not stream" as{TypeError} asy::Stream<dynamic>*)
-      #t395.{core::Set::add}(i);
-    #t395.{core::Set::add}(null);
+      #t395.{core::Set::add}{Invariant}(i);
+    #t395.{core::Set::add}{Invariant}(null);
   } =>#t395;
   core::Map<core::String*, dynamic>* map30 = block {
     final core::Map<core::String*, dynamic>* #t397 = <core::String*, dynamic>{};
@@ -2125,8 +2125,8 @@
  - 'Stream' is from 'dart:async'.
   var map30 = {await for (var i in \"not stream\") \"bar\": i, \"baz\": null};
                                    ^" in "not stream" as{TypeError} asy::Stream<dynamic>*)
-      #t397.{core::Map::[]=}("bar", i);
-    #t397.{core::Map::[]=}("baz", null);
+      #t397.{core::Map::[]=}{Invariant}("bar", i);
+    #t397.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t397;
   core::List<core::int*>* list40 = block {
     final core::List<core::int*>* #t399 = <core::int*>[];
@@ -2135,7 +2135,7 @@
                                                          ^" in "not" as{TypeError} core::int*, let final<BottomType> #t401 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:243:65: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   var list40 = [await for (int i in Stream.fromIterable([\"not\", \"int\"])) i];
                                                                 ^" in "int" as{TypeError} core::int*]))
-      #t399.{core::List::add}(i);
+      #t399.{core::List::add}{Invariant}(i);
   } =>#t399;
   core::Set<core::int*>* set40 = block {
     final core::Set<core::int*>* #t402 = col::LinkedHashSet::•<core::int*>();
@@ -2144,8 +2144,8 @@
                                                         ^" in "not" as{TypeError} core::int*, let final<BottomType> #t404 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:244:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   var set40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) i, null};
                                                                ^" in "int" as{TypeError} core::int*]))
-      #t402.{core::Set::add}(i);
-    #t402.{core::Set::add}(null);
+      #t402.{core::Set::add}{Invariant}(i);
+    #t402.{core::Set::add}{Invariant}(null);
   } =>#t402;
   core::Map<core::String*, core::int*>* map40 = block {
     final core::Map<core::String*, core::int*>* #t405 = <core::String*, core::int*>{};
@@ -2154,82 +2154,82 @@
                                                         ^" in "not" as{TypeError} core::int*, let final<BottomType> #t407 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:245:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   var map40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) \"bar\": i, \"baz\": null};
                                                                ^" in "int" as{TypeError} core::int*]))
-      #t405.{core::Map::[]=}("bar", i);
-    #t405.{core::Map::[]=}("baz", null);
+      #t405.{core::Map::[]=}{Invariant}("bar", i);
+    #t405.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t405;
   core::List<core::int*>* list50 = block {
     final core::List<core::int*>* #t408 = <core::int*>[];
     for (; ; )
-      #t408.{core::List::add}(42);
+      #t408.{core::List::add}{Invariant}(42);
   } =>#t408;
   core::Set<core::int*>* set50 = block {
     final core::Set<core::int*>* #t409 = col::LinkedHashSet::•<core::int*>();
     for (; ; )
-      #t409.{core::Set::add}(42);
-    #t409.{core::Set::add}(null);
+      #t409.{core::Set::add}{Invariant}(42);
+    #t409.{core::Set::add}{Invariant}(null);
   } =>#t409;
   core::Map<core::String*, core::int*>* map50 = block {
     final core::Map<core::String*, core::int*>* #t410 = <core::String*, core::int*>{};
     for (; ; )
-      #t410.{core::Map::[]=}("bar", 42);
-    #t410.{core::Map::[]=}("baz", null);
+      #t410.{core::Map::[]=}{Invariant}("bar", 42);
+    #t410.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t410;
   core::List<core::int*>* list60 = block {
     final core::List<core::int*>* #t411 = <core::int*>[];
     for (; let final<BottomType> #t412 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:249:24: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
   var list60 = [for (; \"not bool\";) 42];
                        ^" in "not bool" as{TypeError} core::bool*; )
-      #t411.{core::List::add}(42);
+      #t411.{core::List::add}{Invariant}(42);
   } =>#t411;
   core::Set<core::int*>* set60 = block {
     final core::Set<core::int*>* #t413 = col::LinkedHashSet::•<core::int*>();
     for (; let final<BottomType> #t414 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:250:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
   var set60 = {for (; \"not bool\";) 42, null};
                       ^" in "not bool" as{TypeError} core::bool*; )
-      #t413.{core::Set::add}(42);
-    #t413.{core::Set::add}(null);
+      #t413.{core::Set::add}{Invariant}(42);
+    #t413.{core::Set::add}{Invariant}(null);
   } =>#t413;
   core::Map<core::String*, core::int*>* map60 = block {
     final core::Map<core::String*, core::int*>* #t415 = <core::String*, core::int*>{};
     for (; let final<BottomType> #t416 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:251:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
   var map60 = {for (; \"not bool\";) \"bar\": 42, \"baz\": null};
                       ^" in "not bool" as{TypeError} core::bool*; )
-      #t415.{core::Map::[]=}("bar", 42);
-    #t415.{core::Map::[]=}("baz", null);
+      #t415.{core::Map::[]=}{Invariant}("bar", 42);
+    #t415.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t415;
 }
 static method testForElementErrorsNotAsync(asy::Stream<core::int*>* stream) → dynamic {
   block {
     final core::List<core::int*>* #t417 = <core::int*>[];
     await for (core::int* i in stream)
-      #t417.{core::List::add}(i);
+      #t417.{core::List::add}{Invariant}(i);
   } =>#t417;
   block {
     final core::Set<core::int*>* #t418 = col::LinkedHashSet::•<core::int*>();
     await for (core::int* i in stream)
-      #t418.{core::Set::add}(i);
+      #t418.{core::Set::add}{Invariant}(i);
   } =>#t418;
   block {
     final core::Map<core::String*, core::int*>* #t419 = <core::String*, core::int*>{};
     await for (core::int* i in stream)
-      #t419.{core::Map::[]=}("bar", i);
+      #t419.{core::Map::[]=}{Invariant}("bar", i);
   } =>#t419;
 }
 static method testPromotion(self::A* a) → dynamic {
   core::List<core::int*>* list10 = block {
     final core::List<core::int*>* #t420 = <core::int*>[];
     if(a is self::B*)
-      #t420.{core::List::add}(a{self::B*}.{self::B::foo});
+      #t420.{core::List::add}{Invariant}(a{self::B*}.{self::B::foo});
   } =>#t420;
   core::Set<core::int*>* set10 = block {
     final core::Set<core::int*>* #t421 = col::LinkedHashSet::•<core::int*>();
     if(a is self::B*)
-      #t421.{core::Set::add}(a{self::B*}.{self::B::foo});
+      #t421.{core::Set::add}{Invariant}(a{self::B*}.{self::B::foo});
   } =>#t421;
   core::Map<core::int*, core::int*>* map10 = block {
     final core::Map<core::int*, core::int*>* #t422 = <core::int*, core::int*>{};
     if(a is self::B*)
-      #t422.{core::Map::[]=}(a{self::B*}.{self::B::foo}, a{self::B*}.{self::B::foo});
+      #t422.{core::Map::[]=}{Invariant}(a{self::B*}.{self::B::foo}, a{self::B*}.{self::B::foo});
   } =>#t422;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/control_flow_collection_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/general/control_flow_collection_inference.dart.strong.transformed.expect
index ea88d5a..898ae52 100644
--- a/pkg/front_end/testcases/general/control_flow_collection_inference.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/control_flow_collection_inference.dart.strong.transformed.expect
@@ -455,53 +455,53 @@
   core::List<core::int*>* list10 = block {
     final core::List<core::int*>* #t1 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t1.{core::List::add}(42);
+      #t1.{core::List::add}{Invariant}(42);
   } =>#t1;
   core::Set<core::int*>* set10 = block {
     final core::Set<core::int*>* #t2 = new col::_CompactLinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t2.{core::Set::add}(42);
-    #t2.{core::Set::add}(null);
+      #t2.{core::Set::add}{Invariant}(42);
+    #t2.{core::Set::add}{Invariant}(null);
   } =>#t2;
   core::Map<core::String*, core::int*>* map10 = block {
     final core::Map<core::String*, core::int*>* #t3 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t3.{core::Map::[]=}("bar", 42);
-    #t3.{core::Map::[]=}("baz", null);
+      #t3.{core::Map::[]=}{Invariant}("bar", 42);
+    #t3.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t3;
   core::List<dynamic>* list11 = block {
     final core::List<dynamic>* #t4 = <dynamic>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t4.{core::List::add}(dynVar);
+      #t4.{core::List::add}{Invariant}(dynVar);
   } =>#t4;
   core::Set<dynamic>* set11 = block {
     final core::Set<dynamic>* #t5 = new col::_CompactLinkedHashSet::•<dynamic>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t5.{core::Set::add}(dynVar);
-    #t5.{core::Set::add}(null);
+      #t5.{core::Set::add}{Invariant}(dynVar);
+    #t5.{core::Set::add}{Invariant}(null);
   } =>#t5;
   core::Map<core::String*, dynamic>* map11 = block {
     final core::Map<core::String*, dynamic>* #t6 = <core::String*, dynamic>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t6.{core::Map::[]=}("bar", dynVar);
-    #t6.{core::Map::[]=}("baz", null);
+      #t6.{core::Map::[]=}{Invariant}("bar", dynVar);
+    #t6.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t6;
   core::List<core::List<core::int*>*>* list12 = block {
     final core::List<core::List<core::int*>*>* #t7 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t7.{core::List::add}(<core::int*>[42]);
+      #t7.{core::List::add}{Invariant}(<core::int*>[42]);
   } =>#t7;
   core::Set<core::List<core::int*>*>* set12 = block {
     final core::Set<core::List<core::int*>*>* #t8 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t8.{core::Set::add}(<core::int*>[42]);
-    #t8.{core::Set::add}(null);
+      #t8.{core::Set::add}{Invariant}(<core::int*>[42]);
+    #t8.{core::Set::add}{Invariant}(null);
   } =>#t8;
   core::Map<core::String*, core::List<core::int*>*>* map12 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t9 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t9.{core::Map::[]=}("bar", <core::int*>[42]);
-    #t9.{core::Map::[]=}("baz", null);
+      #t9.{core::Map::[]=}{Invariant}("bar", <core::int*>[42]);
+    #t9.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t9;
   core::List<core::int*>* list20 = block {
     final core::List<core::int*>* #t10 = <core::int*>[];
@@ -509,7 +509,7 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[42].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t11 = :sync-for-iterator.{core::Iterator::current};
-        #t10.{core::List::add}(#t11);
+        #t10.{core::List::add}{Invariant}(#t11);
       }
     }
   } =>#t10;
@@ -519,10 +519,10 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[42].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t13 = :sync-for-iterator.{core::Iterator::current};
-        #t12.{core::Set::add}(#t13);
+        #t12.{core::Set::add}{Invariant}(#t13);
       }
     }
-    #t12.{core::Set::add}(null);
+    #t12.{core::Set::add}{Invariant}(null);
   } =>#t12;
   core::Map<core::String*, core::int*>* map20 = block {
     final core::Map<core::String*, core::int*>* #t14 = <core::String*, core::int*>{};
@@ -530,10 +530,10 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = <core::String*, core::int*>{"bar": 42}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::int*>* #t15 = :sync-for-iterator.{core::Iterator::current};
-        #t14.{core::Map::[]=}(#t15.{core::MapEntry::key}, #t15.{core::MapEntry::value});
+        #t14.{core::Map::[]=}{Invariant}(#t15.{core::MapEntry::key}, #t15.{core::MapEntry::value});
       }
     }
-    #t14.{core::Map::[]=}("baz", null);
+    #t14.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t14;
   core::List<dynamic>* list21 = block {
     final core::List<dynamic>* #t16 = <dynamic>[];
@@ -541,7 +541,7 @@
       core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[dynVar].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t17 = :sync-for-iterator.{core::Iterator::current};
-        #t16.{core::List::add}(#t17);
+        #t16.{core::List::add}{Invariant}(#t17);
       }
     }
   } =>#t16;
@@ -551,10 +551,10 @@
       core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[dynVar].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t19 = :sync-for-iterator.{core::Iterator::current};
-        #t18.{core::Set::add}(#t19);
+        #t18.{core::Set::add}{Invariant}(#t19);
       }
     }
-    #t18.{core::Set::add}(null);
+    #t18.{core::Set::add}{Invariant}(null);
   } =>#t18;
   core::Map<core::String*, dynamic>* map21 = block {
     final core::Map<core::String*, dynamic>* #t20 = <core::String*, dynamic>{};
@@ -562,10 +562,10 @@
       core::Iterator<core::MapEntry<core::String*, dynamic>>* :sync-for-iterator = <core::String*, dynamic>{"bar": dynVar}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, dynamic>* #t21 = :sync-for-iterator.{core::Iterator::current};
-        #t20.{core::Map::[]=}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
+        #t20.{core::Map::[]=}{Invariant}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
       }
     }
-    #t20.{core::Map::[]=}("baz", null);
+    #t20.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t20;
   core::List<core::List<core::int*>*>* list22 = block {
     final core::List<core::List<core::int*>*>* #t22 = <core::List<core::int*>*>[];
@@ -573,7 +573,7 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[42]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t23 = :sync-for-iterator.{core::Iterator::current};
-        #t22.{core::List::add}(#t23);
+        #t22.{core::List::add}{Invariant}(#t23);
       }
     }
   } =>#t22;
@@ -583,10 +583,10 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[42]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t25 = :sync-for-iterator.{core::Iterator::current};
-        #t24.{core::Set::add}(#t25);
+        #t24.{core::Set::add}{Invariant}(#t25);
       }
     }
-    #t24.{core::Set::add}(null);
+    #t24.{core::Set::add}{Invariant}(null);
   } =>#t24;
   core::Map<core::String*, core::List<core::int*>*>* map22 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t26 = <core::String*, core::List<core::int*>*>{};
@@ -594,10 +594,10 @@
       core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"bar": <core::int*>[42]}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::List<core::int*>*>* #t27 = :sync-for-iterator.{core::Iterator::current};
-        #t26.{core::Map::[]=}(#t27.{core::MapEntry::key}, #t27.{core::MapEntry::value});
+        #t26.{core::Map::[]=}{Invariant}(#t27.{core::MapEntry::key}, #t27.{core::MapEntry::value});
       }
     }
-    #t26.{core::Map::[]=}("baz", null);
+    #t26.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t26;
   core::List<core::int*>* list30 = block {
     final core::List<core::int*>* #t28 = <core::int*>[];
@@ -606,7 +606,7 @@
         core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[42].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::int* #t29 = :sync-for-iterator.{core::Iterator::current};
-          #t28.{core::List::add}(#t29);
+          #t28.{core::List::add}{Invariant}(#t29);
         }
       }
   } =>#t28;
@@ -617,10 +617,10 @@
         core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[42].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::int* #t31 = :sync-for-iterator.{core::Iterator::current};
-          #t30.{core::Set::add}(#t31);
+          #t30.{core::Set::add}{Invariant}(#t31);
         }
       }
-    #t30.{core::Set::add}(null);
+    #t30.{core::Set::add}{Invariant}(null);
   } =>#t30;
   core::Map<core::String*, core::int*>* map30 = block {
     final core::Map<core::String*, core::int*>* #t32 = <core::String*, core::int*>{};
@@ -629,10 +629,10 @@
         core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = <core::String*, core::int*>{"bar": 42}.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, core::int*>* #t33 = :sync-for-iterator.{core::Iterator::current};
-          #t32.{core::Map::[]=}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
+          #t32.{core::Map::[]=}{Invariant}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
         }
       }
-    #t32.{core::Map::[]=}("baz", null);
+    #t32.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t32;
   core::List<dynamic>* list31 = block {
     final core::List<dynamic>* #t34 = <dynamic>[];
@@ -641,7 +641,7 @@
         core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[dynVar].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final dynamic #t35 = :sync-for-iterator.{core::Iterator::current};
-          #t34.{core::List::add}(#t35);
+          #t34.{core::List::add}{Invariant}(#t35);
         }
       }
   } =>#t34;
@@ -652,10 +652,10 @@
         core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[dynVar].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final dynamic #t37 = :sync-for-iterator.{core::Iterator::current};
-          #t36.{core::Set::add}(#t37);
+          #t36.{core::Set::add}{Invariant}(#t37);
         }
       }
-    #t36.{core::Set::add}(null);
+    #t36.{core::Set::add}{Invariant}(null);
   } =>#t36;
   core::Map<core::String*, dynamic>* map31 = block {
     final core::Map<core::String*, dynamic>* #t38 = <core::String*, dynamic>{};
@@ -664,10 +664,10 @@
         core::Iterator<core::MapEntry<core::String*, dynamic>>* :sync-for-iterator = <core::String*, dynamic>{"bar": dynVar}.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, dynamic>* #t39 = :sync-for-iterator.{core::Iterator::current};
-          #t38.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+          #t38.{core::Map::[]=}{Invariant}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
         }
       }
-    #t38.{core::Map::[]=}("baz", null);
+    #t38.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t38;
   core::List<core::List<core::int*>*>* list33 = block {
     final core::List<core::List<core::int*>*>* #t40 = <core::List<core::int*>*>[];
@@ -676,7 +676,7 @@
         core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[42]].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::List<core::int*>* #t41 = :sync-for-iterator.{core::Iterator::current};
-          #t40.{core::List::add}(#t41);
+          #t40.{core::List::add}{Invariant}(#t41);
         }
       }
   } =>#t40;
@@ -687,10 +687,10 @@
         core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[42]].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::List<core::int*>* #t43 = :sync-for-iterator.{core::Iterator::current};
-          #t42.{core::Set::add}(#t43);
+          #t42.{core::Set::add}{Invariant}(#t43);
         }
       }
-    #t42.{core::Set::add}(null);
+    #t42.{core::Set::add}{Invariant}(null);
   } =>#t42;
   core::Map<core::String*, core::List<core::int*>*>* map33 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t44 = <core::String*, core::List<core::int*>*>{};
@@ -699,10 +699,10 @@
         core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"bar": <core::int*>[42]}.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, core::List<core::int*>*>* #t45 = :sync-for-iterator.{core::Iterator::current};
-          #t44.{core::Map::[]=}(#t45.{core::MapEntry::key}, #t45.{core::MapEntry::value});
+          #t44.{core::Map::[]=}{Invariant}(#t45.{core::MapEntry::key}, #t45.{core::MapEntry::value});
         }
       }
-    #t44.{core::Map::[]=}("baz", null);
+    #t44.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t44;
   core::List<core::List<core::int*>*>* list40 = block {
     final core::List<core::List<core::int*>*>* #t46 = <core::List<core::int*>*>[];
@@ -710,7 +710,7 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t47 = :sync-for-iterator.{core::Iterator::current};
-        #t46.{core::List::add}(#t47);
+        #t46.{core::List::add}{Invariant}(#t47);
       }
     }
   } =>#t46;
@@ -720,10 +720,10 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t49 = :sync-for-iterator.{core::Iterator::current};
-        #t48.{core::Set::add}(#t49);
+        #t48.{core::Set::add}{Invariant}(#t49);
       }
     }
-    #t48.{core::Set::add}(null);
+    #t48.{core::Set::add}{Invariant}(null);
   } =>#t48;
   core::Map<core::String*, core::List<core::int*>*>* map40 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:39:34: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
   Map<String, List<int>> map40 = {if (oracle(\"foo\")) ...{\"bar\", []}, \"baz\": null};
@@ -733,11 +733,11 @@
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*) {
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = ( block {
         final core::Set<core::List<core::int*>*>* #t51 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
-        #t51.{core::Set::add}(<core::int*>[]);
+        #t51.{core::Set::add}{Invariant}(<core::int*>[]);
       } =>#t51).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t52 = :sync-for-iterator.{core::Iterator::current};
-        #t50.{core::List::add}(#t52);
+        #t50.{core::List::add}{Invariant}(#t52);
       }
     }
   } =>#t50;
@@ -746,14 +746,14 @@
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*) {
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = ( block {
         final core::Set<core::List<core::int*>*>* #t54 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
-        #t54.{core::Set::add}(<core::int*>[]);
+        #t54.{core::Set::add}{Invariant}(<core::int*>[]);
       } =>#t54).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t55 = :sync-for-iterator.{core::Iterator::current};
-        #t53.{core::Set::add}(#t55);
+        #t53.{core::Set::add}{Invariant}(#t55);
       }
     }
-    #t53.{core::Set::add}(null);
+    #t53.{core::Set::add}{Invariant}(null);
   } =>#t53;
   core::List<core::List<core::int*>*>* list42 = block {
     final core::List<core::List<core::int*>*>* #t56 = <core::List<core::int*>*>[];
@@ -762,7 +762,7 @@
         core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::List<core::int*>* #t57 = :sync-for-iterator.{core::Iterator::current};
-          #t56.{core::List::add}(#t57);
+          #t56.{core::List::add}{Invariant}(#t57);
         }
       }
   } =>#t56;
@@ -773,10 +773,10 @@
         core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::List<core::int*>* #t59 = :sync-for-iterator.{core::Iterator::current};
-          #t58.{core::Set::add}(#t59);
+          #t58.{core::Set::add}{Invariant}(#t59);
         }
       }
-    #t58.{core::Set::add}(null);
+    #t58.{core::Set::add}{Invariant}(null);
   } =>#t58;
   core::Map<core::String*, core::List<core::int*>*>* map42 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t60 = <core::String*, core::List<core::int*>*>{};
@@ -785,10 +785,10 @@
         core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, core::List<core::int*>*>* #t61 = :sync-for-iterator.{core::Iterator::current};
-          #t60.{core::Map::[]=}(#t61.{core::MapEntry::key}, #t61.{core::MapEntry::value});
+          #t60.{core::Map::[]=}{Invariant}(#t61.{core::MapEntry::key}, #t61.{core::MapEntry::value});
         }
       }
-    #t60.{core::Map::[]=}("baz", null);
+    #t60.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t60;
   core::List<core::int*>* list50 = block {
     final core::List<core::int*>* #t62 = <core::int*>[];
@@ -796,7 +796,7 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t63 = :sync-for-iterator.{core::Iterator::current};
-        #t62.{core::List::add}(#t63);
+        #t62.{core::List::add}{Invariant}(#t63);
       }
     }
   } =>#t62;
@@ -806,10 +806,10 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t65 = :sync-for-iterator.{core::Iterator::current};
-        #t64.{core::Set::add}(#t65);
+        #t64.{core::Set::add}{Invariant}(#t65);
       }
     }
-    #t64.{core::Set::add}(null);
+    #t64.{core::Set::add}{Invariant}(null);
   } =>#t64;
   core::Map<core::String*, core::int*>* map50 = block {
     final core::Map<core::String*, core::int*>* #t66 = <core::String*, core::int*>{};
@@ -817,10 +817,10 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = <core::String*, core::int*>{}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::int*>* #t67 = :sync-for-iterator.{core::Iterator::current};
-        #t66.{core::Map::[]=}(#t67.{core::MapEntry::key}, #t67.{core::MapEntry::value});
+        #t66.{core::Map::[]=}{Invariant}(#t67.{core::MapEntry::key}, #t67.{core::MapEntry::value});
       }
     }
-    #t66.{core::Map::[]=}("baz", null);
+    #t66.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t66;
   core::List<core::int*>* list51 = block {
     final core::List<core::int*>* #t68 = <core::int*>[];
@@ -830,7 +830,7 @@
       } =>#t69).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t70 = :sync-for-iterator.{core::Iterator::current};
-        #t68.{core::List::add}(#t70);
+        #t68.{core::List::add}{Invariant}(#t70);
       }
     }
   } =>#t68;
@@ -842,10 +842,10 @@
       } =>#t72).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t73 = :sync-for-iterator.{core::Iterator::current};
-        #t71.{core::Set::add}(#t73);
+        #t71.{core::Set::add}{Invariant}(#t73);
       }
     }
-    #t71.{core::Set::add}(null);
+    #t71.{core::Set::add}{Invariant}(null);
   } =>#t71;
   core::List<core::int*>* list52 = block {
     final core::List<core::int*>* #t74 = <core::int*>[];
@@ -854,7 +854,7 @@
         core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::int* #t75 = :sync-for-iterator.{core::Iterator::current};
-          #t74.{core::List::add}(#t75);
+          #t74.{core::List::add}{Invariant}(#t75);
         }
       }
   } =>#t74;
@@ -865,10 +865,10 @@
         core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::int* #t77 = :sync-for-iterator.{core::Iterator::current};
-          #t76.{core::Set::add}(#t77);
+          #t76.{core::Set::add}{Invariant}(#t77);
         }
       }
-    #t76.{core::Set::add}(null);
+    #t76.{core::Set::add}{Invariant}(null);
   } =>#t76;
   core::Map<core::String*, core::int*>* map52 = block {
     final core::Map<core::String*, core::int*>* #t78 = <core::String*, core::int*>{};
@@ -877,10 +877,10 @@
         core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = <core::String*, core::int*>{}.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, core::int*>* #t79 = :sync-for-iterator.{core::Iterator::current};
-          #t78.{core::Map::[]=}(#t79.{core::MapEntry::key}, #t79.{core::MapEntry::value});
+          #t78.{core::Map::[]=}{Invariant}(#t79.{core::MapEntry::key}, #t79.{core::MapEntry::value});
         }
       }
-    #t78.{core::Map::[]=}("baz", null);
+    #t78.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t78;
   core::List<core::List<core::int*>*>* list60 = block {
     final core::List<core::List<core::int*>*>* #t80 = <core::List<core::int*>*>[];
@@ -888,7 +888,7 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t81 = :sync-for-iterator.{core::Iterator::current};
-        #t80.{core::List::add}(#t81);
+        #t80.{core::List::add}{Invariant}(#t81);
       }
     }
   } =>#t80;
@@ -898,10 +898,10 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t83 = :sync-for-iterator.{core::Iterator::current};
-        #t82.{core::Set::add}(#t83);
+        #t82.{core::Set::add}{Invariant}(#t83);
       }
     }
-    #t82.{core::Set::add}(null);
+    #t82.{core::Set::add}{Invariant}(null);
   } =>#t82;
   core::Map<core::String*, core::List<core::int*>*>* map60 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t84 = <core::String*, core::List<core::int*>*>{};
@@ -909,10 +909,10 @@
       core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::List<core::int*>*>* #t85 = :sync-for-iterator.{core::Iterator::current};
-        #t84.{core::Map::[]=}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
+        #t84.{core::Map::[]=}{Invariant}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
       }
     }
-    #t84.{core::Map::[]=}("baz", null);
+    #t84.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t84;
   core::List<core::List<core::int*>*>* list61 = block {
     final core::List<core::List<core::int*>*>* #t86 = <core::List<core::int*>*>[];
@@ -921,7 +921,7 @@
         core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::List<core::int*>* #t87 = :sync-for-iterator.{core::Iterator::current};
-          #t86.{core::List::add}(#t87);
+          #t86.{core::List::add}{Invariant}(#t87);
         }
       }
   } =>#t86;
@@ -932,10 +932,10 @@
         core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::List<core::int*>* #t89 = :sync-for-iterator.{core::Iterator::current};
-          #t88.{core::Set::add}(#t89);
+          #t88.{core::Set::add}{Invariant}(#t89);
         }
       }
-    #t88.{core::Set::add}(null);
+    #t88.{core::Set::add}{Invariant}(null);
   } =>#t88;
   core::Map<core::String*, core::List<core::int*>*>* map61 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t90 = <core::String*, core::List<core::int*>*>{};
@@ -944,57 +944,57 @@
         core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, core::List<core::int*>*>* #t91 = :sync-for-iterator.{core::Iterator::current};
-          #t90.{core::Map::[]=}(#t91.{core::MapEntry::key}, #t91.{core::MapEntry::value});
+          #t90.{core::Map::[]=}{Invariant}(#t91.{core::MapEntry::key}, #t91.{core::MapEntry::value});
         }
       }
-    #t90.{core::Map::[]=}("baz", null);
+    #t90.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t90;
   core::List<core::List<core::int*>*>* list70 = block {
     final core::List<core::List<core::int*>*>* #t92 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t92.{core::List::add}(<core::int*>[]);
+      #t92.{core::List::add}{Invariant}(<core::int*>[]);
   } =>#t92;
   core::Set<core::List<core::int*>*>* set70 = block {
     final core::Set<core::List<core::int*>*>* #t93 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t93.{core::Set::add}(<core::int*>[]);
-    #t93.{core::Set::add}(null);
+      #t93.{core::Set::add}{Invariant}(<core::int*>[]);
+    #t93.{core::Set::add}{Invariant}(null);
   } =>#t93;
   core::List<core::List<core::int*>*>* list71 = block {
     final core::List<core::List<core::int*>*>* #t94 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t94.{core::List::add}(<core::int*>[]);
+        #t94.{core::List::add}{Invariant}(<core::int*>[]);
   } =>#t94;
   core::Set<core::List<core::int*>*>* set71 = block {
     final core::Set<core::List<core::int*>*>* #t95 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t95.{core::Set::add}(<core::int*>[]);
-    #t95.{core::Set::add}(null);
+        #t95.{core::Set::add}{Invariant}(<core::int*>[]);
+    #t95.{core::Set::add}{Invariant}(null);
   } =>#t95;
   core::List<core::num*>* list80 = block {
     final core::List<core::num*>* #t96 = <core::num*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t96.{core::List::add}(42);
+      #t96.{core::List::add}{Invariant}(42);
     else
-      #t96.{core::List::add}(3.14);
+      #t96.{core::List::add}{Invariant}(3.14);
   } =>#t96;
   core::Set<core::num*>* set80 = block {
     final core::Set<core::num*>* #t97 = new col::_CompactLinkedHashSet::•<core::num*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t97.{core::Set::add}(42);
+      #t97.{core::Set::add}{Invariant}(42);
     else
-      #t97.{core::Set::add}(3.14);
-    #t97.{core::Set::add}(null);
+      #t97.{core::Set::add}{Invariant}(3.14);
+    #t97.{core::Set::add}{Invariant}(null);
   } =>#t97;
   core::Map<core::String*, core::num*>* map80 = block {
     final core::Map<core::String*, core::num*>* #t98 = <core::String*, core::num*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t98.{core::Map::[]=}("bar", 42);
+      #t98.{core::Map::[]=}{Invariant}("bar", 42);
     else
-      #t98.{core::Map::[]=}("bar", 3.14);
-    #t98.{core::Map::[]=}("baz", null);
+      #t98.{core::Map::[]=}{Invariant}("bar", 3.14);
+    #t98.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t98;
   core::List<core::num*>* list81 = block {
     final core::List<core::num*>* #t99 = <core::num*>[];
@@ -1002,14 +1002,14 @@
       core::Iterator<core::int*>* :sync-for-iterator = listInt.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::num* #t100 = :sync-for-iterator.{core::Iterator::current};
-        #t99.{core::List::add}(#t100);
+        #t99.{core::List::add}{Invariant}(#t100);
       }
     }
     else {
       core::Iterator<core::double*>* :sync-for-iterator = listDouble.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::num* #t101 = :sync-for-iterator.{core::Iterator::current};
-        #t99.{core::List::add}(#t101);
+        #t99.{core::List::add}{Invariant}(#t101);
       }
     }
   } =>#t99;
@@ -1019,17 +1019,17 @@
       core::Iterator<core::int*>* :sync-for-iterator = listInt.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::num* #t103 = :sync-for-iterator.{core::Iterator::current};
-        #t102.{core::Set::add}(#t103);
+        #t102.{core::Set::add}{Invariant}(#t103);
       }
     }
     else {
       core::Iterator<core::double*>* :sync-for-iterator = listDouble.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::num* #t104 = :sync-for-iterator.{core::Iterator::current};
-        #t102.{core::Set::add}(#t104);
+        #t102.{core::Set::add}{Invariant}(#t104);
       }
     }
-    #t102.{core::Set::add}(null);
+    #t102.{core::Set::add}{Invariant}(null);
   } =>#t102;
   core::Map<core::String*, core::num*>* map81 = block {
     final core::Map<core::String*, core::num*>* #t105 = <core::String*, core::num*>{};
@@ -1037,17 +1037,17 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapToInt.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::num*>* #t106 = :sync-for-iterator.{core::Iterator::current};
-        #t105.{core::Map::[]=}(#t106.{core::MapEntry::key}, #t106.{core::MapEntry::value});
+        #t105.{core::Map::[]=}{Invariant}(#t106.{core::MapEntry::key}, #t106.{core::MapEntry::value});
       }
     }
     else {
       core::Iterator<core::MapEntry<core::String*, core::double*>>* :sync-for-iterator = mapToDouble.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::num*>* #t107 = :sync-for-iterator.{core::Iterator::current};
-        #t105.{core::Map::[]=}(#t107.{core::MapEntry::key}, #t107.{core::MapEntry::value});
+        #t105.{core::Map::[]=}{Invariant}(#t107.{core::MapEntry::key}, #t107.{core::MapEntry::value});
       }
     }
-    #t105.{core::Map::[]=}("baz", null);
+    #t105.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t105;
   core::List<dynamic>* list82 = block {
     final core::List<dynamic>* #t108 = <dynamic>[];
@@ -1055,14 +1055,14 @@
       core::Iterator<core::int*>* :sync-for-iterator = listInt.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t109 = :sync-for-iterator.{core::Iterator::current};
-        #t108.{core::List::add}(#t109);
+        #t108.{core::List::add}{Invariant}(#t109);
       }
     }
     else {
       core::Iterator<dynamic>* :sync-for-iterator = (dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t110 = :sync-for-iterator.{core::Iterator::current};
-        #t108.{core::List::add}(#t110);
+        #t108.{core::List::add}{Invariant}(#t110);
       }
     }
   } =>#t108;
@@ -1072,22 +1072,22 @@
       core::Iterator<core::int*>* :sync-for-iterator = listInt.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t112 = :sync-for-iterator.{core::Iterator::current};
-        #t111.{core::Set::add}(#t112);
+        #t111.{core::Set::add}{Invariant}(#t112);
       }
     }
     else {
       core::Iterator<dynamic>* :sync-for-iterator = (dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t113 = :sync-for-iterator.{core::Iterator::current};
-        #t111.{core::Set::add}(#t113);
+        #t111.{core::Set::add}{Invariant}(#t113);
       }
     }
-    #t111.{core::Set::add}(null);
+    #t111.{core::Set::add}{Invariant}(null);
   } =>#t111;
   core::Set<dynamic>* map82 = block {
     final core::Set<dynamic>* #t114 = new col::_CompactLinkedHashSet::•<dynamic>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t114.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:71:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t114.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:71:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   var map82 = {if (oracle(\"foo\")) ...mapToInt else ...dynVar, null};
                                      ^");
@@ -1095,20 +1095,20 @@
       core::Iterator<dynamic>* :sync-for-iterator = (dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t115 = :sync-for-iterator.{core::Iterator::current};
-        #t114.{core::Set::add}(#t115);
+        #t114.{core::Set::add}{Invariant}(#t115);
       }
     }
-    #t114.{core::Set::add}(null);
+    #t114.{core::Set::add}{Invariant}(null);
   } =>#t114;
   core::List<core::num*>* list83 = block {
     final core::List<core::num*>* #t116 = <core::num*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t116.{core::List::add}(42);
+      #t116.{core::List::add}{Invariant}(42);
     else {
       core::Iterator<core::double*>* :sync-for-iterator = listDouble.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::num* #t117 = :sync-for-iterator.{core::Iterator::current};
-        #t116.{core::List::add}(#t117);
+        #t116.{core::List::add}{Invariant}(#t117);
       }
     }
   } =>#t116;
@@ -1118,12 +1118,12 @@
       core::Iterator<core::int*>* :sync-for-iterator = listInt.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::num* #t119 = :sync-for-iterator.{core::Iterator::current};
-        #t118.{core::Set::add}(#t119);
+        #t118.{core::Set::add}{Invariant}(#t119);
       }
     }
     else
-      #t118.{core::Set::add}(3.14);
-    #t118.{core::Set::add}(null);
+      #t118.{core::Set::add}{Invariant}(3.14);
+    #t118.{core::Set::add}{Invariant}(null);
   } =>#t118;
   core::Map<core::String*, core::num*>* map83 = block {
     final core::Map<core::String*, core::num*>* #t120 = <core::String*, core::num*>{};
@@ -1131,29 +1131,29 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapToInt.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::num*>* #t121 = :sync-for-iterator.{core::Iterator::current};
-        #t120.{core::Map::[]=}(#t121.{core::MapEntry::key}, #t121.{core::MapEntry::value});
+        #t120.{core::Map::[]=}{Invariant}(#t121.{core::MapEntry::key}, #t121.{core::MapEntry::value});
       }
     }
     else
-      #t120.{core::Map::[]=}("bar", 3.14);
-    #t120.{core::Map::[]=}("baz", null);
+      #t120.{core::Map::[]=}{Invariant}("bar", 3.14);
+    #t120.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t120;
   core::List<core::int*>* list90 = block {
     final core::List<core::int*>* #t122 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t122.{core::List::add}(dynVar as{TypeError,ForDynamic} core::int*);
+      #t122.{core::List::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*);
   } =>#t122;
   core::Set<core::int*>* set90 = block {
     final core::Set<core::int*>* #t123 = new col::_CompactLinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t123.{core::Set::add}(dynVar as{TypeError,ForDynamic} core::int*);
-    #t123.{core::Set::add}(null);
+      #t123.{core::Set::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*);
+    #t123.{core::Set::add}{Invariant}(null);
   } =>#t123;
   core::Map<core::String*, core::int*>* map90 = block {
     final core::Map<core::String*, core::int*>* #t124 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t124.{core::Map::[]=}("bar", dynVar as{TypeError,ForDynamic} core::int*);
-    #t124.{core::Map::[]=}("baz", null);
+      #t124.{core::Map::[]=}{Invariant}("bar", dynVar as{TypeError,ForDynamic} core::int*);
+    #t124.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t124;
   core::List<core::int*>* list91 = block {
     final core::List<core::int*>* #t125 = <core::int*>[];
@@ -1163,7 +1163,7 @@
         final dynamic #t126 = :sync-for-iterator.{core::Iterator::current};
         {
           final core::int* #t127 = #t126 as{TypeError} core::int*;
-          #t125.{core::List::add}(#t127);
+          #t125.{core::List::add}{Invariant}(#t127);
         }
       }
     }
@@ -1176,11 +1176,11 @@
         final dynamic #t129 = :sync-for-iterator.{core::Iterator::current};
         {
           final core::int* #t130 = #t129 as{TypeError} core::int*;
-          #t128.{core::Set::add}(#t130);
+          #t128.{core::Set::add}{Invariant}(#t130);
         }
       }
     }
-    #t128.{core::Set::add}(null);
+    #t128.{core::Set::add}{Invariant}(null);
   } =>#t128;
   core::Map<core::String*, core::int*>* map91 = block {
     final core::Map<core::String*, core::int*>* #t131 = <core::String*, core::int*>{};
@@ -1191,51 +1191,51 @@
         {
           final core::String* #t133 = #t132.{core::MapEntry::key} as{TypeError} core::String*;
           final core::int* #t134 = #t132.{core::MapEntry::value} as{TypeError} core::int*;
-          #t131.{core::Map::[]=}(#t133, #t134);
+          #t131.{core::Map::[]=}{Invariant}(#t133, #t134);
         }
       }
     }
-    #t131.{core::Map::[]=}("baz", null);
+    #t131.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t131;
   core::List<core::int*>* list100 = block {
     final core::List<core::int*>* #t135 = <core::int*>[];
     if(dynVar as{TypeError,ForDynamic} core::bool*)
-      #t135.{core::List::add}(42);
+      #t135.{core::List::add}{Invariant}(42);
   } =>#t135;
   core::Set<core::int*>* set100 = block {
     final core::Set<core::int*>* #t136 = new col::_CompactLinkedHashSet::•<core::int*>();
     if(dynVar as{TypeError,ForDynamic} core::bool*)
-      #t136.{core::Set::add}(42);
+      #t136.{core::Set::add}{Invariant}(42);
   } =>#t136;
   core::Map<core::int*, core::int*>* map100 = block {
     final core::Map<core::int*, core::int*>* #t137 = <core::int*, core::int*>{};
     if(dynVar as{TypeError,ForDynamic} core::bool*)
-      #t137.{core::Map::[]=}(42, 42);
+      #t137.{core::Map::[]=}{Invariant}(42, 42);
   } =>#t137;
 }
 static method testIfElementErrors(core::Map<core::int*, core::int*>* map) → dynamic {
   block {
     final core::List<core::int*>* #t138 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t138.{core::List::add}(let final<BottomType> #t139 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:87:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+      #t138.{core::List::add}{Invariant}(let final<BottomType> #t139 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:87:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>[if (oracle(\"foo\")) \"bar\"];
                            ^" in "bar" as{TypeError} core::int*);
   } =>#t138;
   block {
     final core::Set<core::int*>* #t140 = new col::_CompactLinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t140.{core::Set::add}(let final<BottomType> #t141 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:88:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+      #t140.{core::Set::add}{Invariant}(let final<BottomType> #t141 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:88:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>{if (oracle(\"foo\")) \"bar\", null};
                            ^" in "bar" as{TypeError} core::int*);
-    #t140.{core::Set::add}(null);
+    #t140.{core::Set::add}{Invariant}(null);
   } =>#t140;
   block {
     final core::Map<core::String*, core::int*>* #t142 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t142.{core::Map::[]=}("bar", let final<BottomType> #t143 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:89:43: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+      #t142.{core::Map::[]=}{Invariant}("bar", let final<BottomType> #t143 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:89:43: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <String, int>{if (oracle(\"foo\")) \"bar\": \"bar\", \"baz\": null};
                                           ^" in "bar" as{TypeError} core::int*);
-    #t142.{core::Map::[]=}("baz", null);
+    #t142.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t142;
   block {
     final core::List<core::int*>* #t144 = <core::int*>[];
@@ -1245,7 +1245,7 @@
                                ^" in "bar" as{TypeError} core::int*].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t146 = :sync-for-iterator.{core::Iterator::current};
-        #t144.{core::List::add}(#t146);
+        #t144.{core::List::add}{Invariant}(#t146);
       }
     }
   } =>#t144;
@@ -1257,10 +1257,10 @@
                                ^" in "bar" as{TypeError} core::int*].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t149 = :sync-for-iterator.{core::Iterator::current};
-        #t147.{core::Set::add}(#t149);
+        #t147.{core::Set::add}{Invariant}(#t149);
       }
     }
-    #t147.{core::Set::add}(null);
+    #t147.{core::Set::add}{Invariant}(null);
   } =>#t147;
   block {
     final core::Map<core::String*, core::int*>* #t150 = <core::String*, core::int*>{};
@@ -1270,15 +1270,15 @@
                                               ^" in "bar" as{TypeError} core::int*}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::int*>* #t152 = :sync-for-iterator.{core::Iterator::current};
-        #t150.{core::Map::[]=}(#t152.{core::MapEntry::key}, #t152.{core::MapEntry::value});
+        #t150.{core::Map::[]=}{Invariant}(#t152.{core::MapEntry::key}, #t152.{core::MapEntry::value});
       }
     }
-    #t150.{core::Map::[]=}("baz", null);
+    #t150.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t150;
   block {
     final core::List<core::int*>* #t153 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t153.{core::List::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:93:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t153.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:93:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[if (oracle(\"foo\")) ...map];
                               ^");
@@ -1286,11 +1286,11 @@
   block {
     final core::Set<core::int*>* #t154 = new col::_CompactLinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t154.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:94:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t154.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:94:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{if (oracle(\"foo\")) ...map, null};
                               ^");
-    #t154.{core::Set::add}(null);
+    #t154.{core::Set::add}{Invariant}(null);
   } =>#t154;
   <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:95:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -1302,58 +1302,58 @@
   block {
     final core::List<core::String*>* #t155 = <core::String*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t155.{core::List::add}(let final<BottomType> #t156 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:96:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t155.{core::List::add}{Invariant}(let final<BottomType> #t156 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:96:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String>[if (oracle(\"foo\")) 42 else 3.14];
                               ^" in 42 as{TypeError} core::String*);
     else
-      #t155.{core::List::add}(let final<BottomType> #t157 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:96:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+      #t155.{core::List::add}{Invariant}(let final<BottomType> #t157 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:96:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String>[if (oracle(\"foo\")) 42 else 3.14];
                                       ^" in 3.14 as{TypeError} core::String*);
   } =>#t155;
   block {
     final core::Set<core::String*>* #t158 = new col::_CompactLinkedHashSet::•<core::String*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t158.{core::Set::add}(let final<BottomType> #t159 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:97:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t158.{core::Set::add}{Invariant}(let final<BottomType> #t159 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:97:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String>{if (oracle(\"foo\")) 42 else 3.14, null};
                               ^" in 42 as{TypeError} core::String*);
     else
-      #t158.{core::Set::add}(let final<BottomType> #t160 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:97:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+      #t158.{core::Set::add}{Invariant}(let final<BottomType> #t160 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:97:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String>{if (oracle(\"foo\")) 42 else 3.14, null};
                                       ^" in 3.14 as{TypeError} core::String*);
-    #t158.{core::Set::add}(null);
+    #t158.{core::Set::add}{Invariant}(null);
   } =>#t158;
   block {
     final core::Map<core::String*, core::String*>* #t161 = <core::String*, core::String*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t161.{core::Map::[]=}("bar", let final<BottomType> #t162 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:98:46: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t161.{core::Map::[]=}{Invariant}("bar", let final<BottomType> #t162 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:98:46: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String, String>{if (oracle(\"foo\")) \"bar\": 42 else \"baz\": 3.14, \"baz\": null};
                                              ^" in 42 as{TypeError} core::String*);
     else
-      #t161.{core::Map::[]=}("baz", let final<BottomType> #t163 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:98:61: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+      #t161.{core::Map::[]=}{Invariant}("baz", let final<BottomType> #t163 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:98:61: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String, String>{if (oracle(\"foo\")) \"bar\": 42 else \"baz\": 3.14, \"baz\": null};
                                                             ^" in 3.14 as{TypeError} core::String*);
-    #t161.{core::Map::[]=}("baz", null);
+    #t161.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t161;
   block {
     final core::List<core::int*>* #t164 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t164.{core::List::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:99:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t164.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:99:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[if (oracle(\"foo\")) ...map else 42];
                               ^");
     else
-      #t164.{core::List::add}(42);
+      #t164.{core::List::add}{Invariant}(42);
   } =>#t164;
   block {
     final core::Set<core::int*>* #t165 = new col::_CompactLinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t165.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:100:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t165.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:100:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{if (oracle(\"foo\")) ...map else 42, null};
                               ^");
     else
-      #t165.{core::Set::add}(42);
-    #t165.{core::Set::add}(null);
+      #t165.{core::Set::add}{Invariant}(42);
+    #t165.{core::Set::add}{Invariant}(null);
   } =>#t165;
   <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:101:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -1365,9 +1365,9 @@
   block {
     final core::List<core::int*>* #t166 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t166.{core::List::add}(42);
+      #t166.{core::List::add}{Invariant}(42);
     else
-      #t166.{core::List::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:102:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t166.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:102:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[if (oracle(\"foo\")) 42 else ...map];
                                       ^");
@@ -1375,13 +1375,13 @@
   block {
     final core::Set<core::int*>* #t167 = new col::_CompactLinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t167.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:103:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t167.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:103:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{if (oracle(\"foo\")) ...map else 42, null};
                               ^");
     else
-      #t167.{core::Set::add}(42);
-    #t167.{core::Set::add}(null);
+      #t167.{core::Set::add}{Invariant}(42);
+    #t167.{core::Set::add}{Invariant}(null);
   } =>#t167;
   <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:104:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -1413,63 +1413,63 @@
     if(let final<BottomType> #t169 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:112:27: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
   List<int> list20 = [if (42) 42];
                           ^" in 42 as{TypeError} core::bool*)
-      #t168.{core::List::add}(42);
+      #t168.{core::List::add}{Invariant}(42);
   } =>#t168;
   core::Set<core::int*>* set20 = block {
     final core::Set<core::int*>* #t170 = new col::_CompactLinkedHashSet::•<core::int*>();
     if(let final<BottomType> #t171 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:113:25: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
   Set<int> set20 = {if (42) 42};
                         ^" in 42 as{TypeError} core::bool*)
-      #t170.{core::Set::add}(42);
+      #t170.{core::Set::add}{Invariant}(42);
   } =>#t170;
   core::Map<core::int*, core::int*>* map30 = block {
     final core::Map<core::int*, core::int*>* #t172 = <core::int*, core::int*>{};
     if(let final<BottomType> #t173 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:114:30: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
   Map<int, int> map30 = {if (42) 42: 42};
                              ^" in 42 as{TypeError} core::bool*)
-      #t172.{core::Map::[]=}(42, 42);
+      #t172.{core::Map::[]=}{Invariant}(42, 42);
   } =>#t172;
   core::List<core::String*>* list40 = block {
     final core::List<core::String*>* #t174 = <core::String*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t174.{core::List::add}(let final<BottomType> #t175 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:115:53: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+      #t174.{core::List::add}{Invariant}(let final<BottomType> #t175 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:115:53: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
   List<String> list40 = <String>[if (oracle(\"foo\")) true else 42];
                                                     ^" in true as{TypeError} core::String*);
     else
-      #t174.{core::List::add}(let final<BottomType> #t176 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:115:63: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t174.{core::List::add}{Invariant}(let final<BottomType> #t176 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:115:63: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   List<String> list40 = <String>[if (oracle(\"foo\")) true else 42];
                                                               ^" in 42 as{TypeError} core::String*);
   } =>#t174;
   core::Set<core::String*>* set40 = block {
     final core::Set<core::String*>* #t177 = new col::_CompactLinkedHashSet::•<core::String*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t177.{core::Set::add}(let final<BottomType> #t178 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:116:51: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+      #t177.{core::Set::add}{Invariant}(let final<BottomType> #t178 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:116:51: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
   Set<String> set40 = <String>{if (oracle(\"foo\")) true else 42};
                                                   ^" in true as{TypeError} core::String*);
     else
-      #t177.{core::Set::add}(let final<BottomType> #t179 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:116:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t177.{core::Set::add}{Invariant}(let final<BottomType> #t179 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:116:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   Set<String> set40 = <String>{if (oracle(\"foo\")) true else 42};
                                                             ^" in 42 as{TypeError} core::String*);
   } =>#t177;
   core::Map<core::String*, core::int*>* map40 = block {
     final core::Map<core::String*, core::int*>* #t180 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t180.{core::Map::[]=}(let final<BottomType> #t181 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:117:61: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+      #t180.{core::Map::[]=}{Invariant}(let final<BottomType> #t181 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:117:61: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
   Map<String, int> map40 = <String, int>{if (oracle(\"foo\")) true: 42 else 42: 42};
                                                             ^" in true as{TypeError} core::String*, 42);
     else
-      #t180.{core::Map::[]=}(let final<BottomType> #t182 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:117:75: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t180.{core::Map::[]=}{Invariant}(let final<BottomType> #t182 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:117:75: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   Map<String, int> map40 = <String, int>{if (oracle(\"foo\")) true: 42 else 42: 42};
                                                                           ^" in 42 as{TypeError} core::String*, 42);
   } =>#t180;
   core::Map<core::int*, core::String*>* map41 = block {
     final core::Map<core::int*, core::String*>* #t183 = <core::int*, core::String*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t183.{core::Map::[]=}(42, let final<BottomType> #t184 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:118:65: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+      #t183.{core::Map::[]=}{Invariant}(42, let final<BottomType> #t184 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:118:65: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
   Map<int, String> map41 = <int, String>{if (oracle(\"foo\")) 42: true else 42: 42};
                                                                 ^" in true as{TypeError} core::String*);
     else
-      #t183.{core::Map::[]=}(42, let final<BottomType> #t185 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:118:79: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t183.{core::Map::[]=}{Invariant}(42, let final<BottomType> #t185 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:118:79: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   Map<int, String> map41 = <int, String>{if (oracle(\"foo\")) 42: true else 42: 42};
                                                                               ^" in 42 as{TypeError} core::String*);
   } =>#t183;
@@ -1478,53 +1478,53 @@
   core::List<core::int*>* list10 = block {
     final core::List<core::int*>* #t186 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t186.{core::List::add}(42);
+      #t186.{core::List::add}{Invariant}(42);
   } =>#t186;
   core::Set<core::int*>* set10 = block {
     final core::Set<core::int*>* #t187 = new col::_CompactLinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t187.{core::Set::add}(42);
-    #t187.{core::Set::add}(null);
+      #t187.{core::Set::add}{Invariant}(42);
+    #t187.{core::Set::add}{Invariant}(null);
   } =>#t187;
   core::Map<core::String*, core::int*>* map10 = block {
     final core::Map<core::String*, core::int*>* #t188 = <core::String*, core::int*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t188.{core::Map::[]=}("bar", 42);
-    #t188.{core::Map::[]=}("baz", null);
+      #t188.{core::Map::[]=}{Invariant}("bar", 42);
+    #t188.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t188;
   core::List<dynamic>* list11 = block {
     final core::List<dynamic>* #t189 = <dynamic>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t189.{core::List::add}(dynVar);
+      #t189.{core::List::add}{Invariant}(dynVar);
   } =>#t189;
   core::Set<dynamic>* set11 = block {
     final core::Set<dynamic>* #t190 = new col::_CompactLinkedHashSet::•<dynamic>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t190.{core::Set::add}(dynVar);
-    #t190.{core::Set::add}(null);
+      #t190.{core::Set::add}{Invariant}(dynVar);
+    #t190.{core::Set::add}{Invariant}(null);
   } =>#t190;
   core::Map<core::String*, dynamic>* map11 = block {
     final core::Map<core::String*, dynamic>* #t191 = <core::String*, dynamic>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t191.{core::Map::[]=}("bar", dynVar);
-    #t191.{core::Map::[]=}("baz", null);
+      #t191.{core::Map::[]=}{Invariant}("bar", dynVar);
+    #t191.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t191;
   core::List<core::List<core::int*>*>* list12 = block {
     final core::List<core::List<core::int*>*>* #t192 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t192.{core::List::add}(<core::int*>[42]);
+      #t192.{core::List::add}{Invariant}(<core::int*>[42]);
   } =>#t192;
   core::Set<core::List<core::int*>*>* set12 = block {
     final core::Set<core::List<core::int*>*>* #t193 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t193.{core::Set::add}(<core::int*>[42]);
-    #t193.{core::Set::add}(null);
+      #t193.{core::Set::add}{Invariant}(<core::int*>[42]);
+    #t193.{core::Set::add}{Invariant}(null);
   } =>#t193;
   core::Map<core::String*, core::List<core::int*>*>* map12 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t194 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t194.{core::Map::[]=}("bar", <core::int*>[42]);
-    #t194.{core::Map::[]=}("baz", null);
+      #t194.{core::Map::[]=}{Invariant}("bar", <core::int*>[42]);
+    #t194.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t194;
   core::List<core::int*>* list20 = block {
     final core::List<core::int*>* #t195 = <core::int*>[];
@@ -1532,7 +1532,7 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[42].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t196 = :sync-for-iterator.{core::Iterator::current};
-        #t195.{core::List::add}(#t196);
+        #t195.{core::List::add}{Invariant}(#t196);
       }
     }
   } =>#t195;
@@ -1542,10 +1542,10 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[42].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t198 = :sync-for-iterator.{core::Iterator::current};
-        #t197.{core::Set::add}(#t198);
+        #t197.{core::Set::add}{Invariant}(#t198);
       }
     }
-    #t197.{core::Set::add}(null);
+    #t197.{core::Set::add}{Invariant}(null);
   } =>#t197;
   core::Map<core::String*, core::int*>* map20 = block {
     final core::Map<core::String*, core::int*>* #t199 = <core::String*, core::int*>{};
@@ -1553,10 +1553,10 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = <core::String*, core::int*>{"bar": 42}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::int*>* #t200 = :sync-for-iterator.{core::Iterator::current};
-        #t199.{core::Map::[]=}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
+        #t199.{core::Map::[]=}{Invariant}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
       }
     }
-    #t199.{core::Map::[]=}("baz", null);
+    #t199.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t199;
   core::List<dynamic>* list21 = block {
     final core::List<dynamic>* #t201 = <dynamic>[];
@@ -1564,7 +1564,7 @@
       core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[dynVar].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t202 = :sync-for-iterator.{core::Iterator::current};
-        #t201.{core::List::add}(#t202);
+        #t201.{core::List::add}{Invariant}(#t202);
       }
     }
   } =>#t201;
@@ -1574,10 +1574,10 @@
       core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[dynVar].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t204 = :sync-for-iterator.{core::Iterator::current};
-        #t203.{core::Set::add}(#t204);
+        #t203.{core::Set::add}{Invariant}(#t204);
       }
     }
-    #t203.{core::Set::add}(null);
+    #t203.{core::Set::add}{Invariant}(null);
   } =>#t203;
   core::Map<core::String*, dynamic>* map21 = block {
     final core::Map<core::String*, dynamic>* #t205 = <core::String*, dynamic>{};
@@ -1585,10 +1585,10 @@
       core::Iterator<core::MapEntry<core::String*, dynamic>>* :sync-for-iterator = <core::String*, dynamic>{"bar": dynVar}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, dynamic>* #t206 = :sync-for-iterator.{core::Iterator::current};
-        #t205.{core::Map::[]=}(#t206.{core::MapEntry::key}, #t206.{core::MapEntry::value});
+        #t205.{core::Map::[]=}{Invariant}(#t206.{core::MapEntry::key}, #t206.{core::MapEntry::value});
       }
     }
-    #t205.{core::Map::[]=}("baz", null);
+    #t205.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t205;
   core::List<core::List<core::int*>*>* list22 = block {
     final core::List<core::List<core::int*>*>* #t207 = <core::List<core::int*>*>[];
@@ -1596,7 +1596,7 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[42]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t208 = :sync-for-iterator.{core::Iterator::current};
-        #t207.{core::List::add}(#t208);
+        #t207.{core::List::add}{Invariant}(#t208);
       }
     }
   } =>#t207;
@@ -1606,10 +1606,10 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[42]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t210 = :sync-for-iterator.{core::Iterator::current};
-        #t209.{core::Set::add}(#t210);
+        #t209.{core::Set::add}{Invariant}(#t210);
       }
     }
-    #t209.{core::Set::add}(null);
+    #t209.{core::Set::add}{Invariant}(null);
   } =>#t209;
   core::Map<core::String*, core::List<core::int*>*>* map22 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t211 = <core::String*, core::List<core::int*>*>{};
@@ -1617,10 +1617,10 @@
       core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"bar": <core::int*>[42]}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::List<core::int*>*>* #t212 = :sync-for-iterator.{core::Iterator::current};
-        #t211.{core::Map::[]=}(#t212.{core::MapEntry::key}, #t212.{core::MapEntry::value});
+        #t211.{core::Map::[]=}{Invariant}(#t212.{core::MapEntry::key}, #t212.{core::MapEntry::value});
       }
     }
-    #t211.{core::Map::[]=}("baz", null);
+    #t211.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t211;
   core::List<core::int*>* list30 = block {
     final core::List<core::int*>* #t213 = <core::int*>[];
@@ -1629,7 +1629,7 @@
         core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[42].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::int* #t214 = :sync-for-iterator.{core::Iterator::current};
-          #t213.{core::List::add}(#t214);
+          #t213.{core::List::add}{Invariant}(#t214);
         }
       }
   } =>#t213;
@@ -1640,10 +1640,10 @@
         core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[42].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::int* #t216 = :sync-for-iterator.{core::Iterator::current};
-          #t215.{core::Set::add}(#t216);
+          #t215.{core::Set::add}{Invariant}(#t216);
         }
       }
-    #t215.{core::Set::add}(null);
+    #t215.{core::Set::add}{Invariant}(null);
   } =>#t215;
   core::Map<core::String*, core::int*>* map30 = block {
     final core::Map<core::String*, core::int*>* #t217 = <core::String*, core::int*>{};
@@ -1652,10 +1652,10 @@
         core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = <core::String*, core::int*>{"bar": 42}.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, core::int*>* #t218 = :sync-for-iterator.{core::Iterator::current};
-          #t217.{core::Map::[]=}(#t218.{core::MapEntry::key}, #t218.{core::MapEntry::value});
+          #t217.{core::Map::[]=}{Invariant}(#t218.{core::MapEntry::key}, #t218.{core::MapEntry::value});
         }
       }
-    #t217.{core::Map::[]=}("baz", null);
+    #t217.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t217;
   core::List<dynamic>* list31 = block {
     final core::List<dynamic>* #t219 = <dynamic>[];
@@ -1664,7 +1664,7 @@
         core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[dynVar].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final dynamic #t220 = :sync-for-iterator.{core::Iterator::current};
-          #t219.{core::List::add}(#t220);
+          #t219.{core::List::add}{Invariant}(#t220);
         }
       }
   } =>#t219;
@@ -1675,10 +1675,10 @@
         core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[dynVar].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final dynamic #t222 = :sync-for-iterator.{core::Iterator::current};
-          #t221.{core::Set::add}(#t222);
+          #t221.{core::Set::add}{Invariant}(#t222);
         }
       }
-    #t221.{core::Set::add}(null);
+    #t221.{core::Set::add}{Invariant}(null);
   } =>#t221;
   core::Map<core::String*, dynamic>* map31 = block {
     final core::Map<core::String*, dynamic>* #t223 = <core::String*, dynamic>{};
@@ -1687,10 +1687,10 @@
         core::Iterator<core::MapEntry<core::String*, dynamic>>* :sync-for-iterator = <core::String*, dynamic>{"bar": dynVar}.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, dynamic>* #t224 = :sync-for-iterator.{core::Iterator::current};
-          #t223.{core::Map::[]=}(#t224.{core::MapEntry::key}, #t224.{core::MapEntry::value});
+          #t223.{core::Map::[]=}{Invariant}(#t224.{core::MapEntry::key}, #t224.{core::MapEntry::value});
         }
       }
-    #t223.{core::Map::[]=}("baz", null);
+    #t223.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t223;
   core::List<core::List<core::int*>*>* list33 = block {
     final core::List<core::List<core::int*>*>* #t225 = <core::List<core::int*>*>[];
@@ -1699,7 +1699,7 @@
         core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[42]].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::List<core::int*>* #t226 = :sync-for-iterator.{core::Iterator::current};
-          #t225.{core::List::add}(#t226);
+          #t225.{core::List::add}{Invariant}(#t226);
         }
       }
   } =>#t225;
@@ -1710,10 +1710,10 @@
         core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[42]].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::List<core::int*>* #t228 = :sync-for-iterator.{core::Iterator::current};
-          #t227.{core::Set::add}(#t228);
+          #t227.{core::Set::add}{Invariant}(#t228);
         }
       }
-    #t227.{core::Set::add}(null);
+    #t227.{core::Set::add}{Invariant}(null);
   } =>#t227;
   core::Map<core::String*, core::List<core::int*>*>* map33 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t229 = <core::String*, core::List<core::int*>*>{};
@@ -1722,10 +1722,10 @@
         core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"bar": <core::int*>[42]}.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, core::List<core::int*>*>* #t230 = :sync-for-iterator.{core::Iterator::current};
-          #t229.{core::Map::[]=}(#t230.{core::MapEntry::key}, #t230.{core::MapEntry::value});
+          #t229.{core::Map::[]=}{Invariant}(#t230.{core::MapEntry::key}, #t230.{core::MapEntry::value});
         }
       }
-    #t229.{core::Map::[]=}("baz", null);
+    #t229.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t229;
   core::List<core::List<core::int*>*>* list40 = block {
     final core::List<core::List<core::int*>*>* #t231 = <core::List<core::int*>*>[];
@@ -1733,7 +1733,7 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t232 = :sync-for-iterator.{core::Iterator::current};
-        #t231.{core::List::add}(#t232);
+        #t231.{core::List::add}{Invariant}(#t232);
       }
     }
   } =>#t231;
@@ -1743,10 +1743,10 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t234 = :sync-for-iterator.{core::Iterator::current};
-        #t233.{core::Set::add}(#t234);
+        #t233.{core::Set::add}{Invariant}(#t234);
       }
     }
-    #t233.{core::Set::add}(null);
+    #t233.{core::Set::add}{Invariant}(null);
   } =>#t233;
   core::Map<core::String*, core::List<core::int*>*>* map40 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t235 = <core::String*, core::List<core::int*>*>{};
@@ -1754,21 +1754,21 @@
       core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::List<core::int*>*>* #t236 = :sync-for-iterator.{core::Iterator::current};
-        #t235.{core::Map::[]=}(#t236.{core::MapEntry::key}, #t236.{core::MapEntry::value});
+        #t235.{core::Map::[]=}{Invariant}(#t236.{core::MapEntry::key}, #t236.{core::MapEntry::value});
       }
     }
-    #t235.{core::Map::[]=}("baz", null);
+    #t235.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t235;
   core::List<core::List<core::int*>*>* list41 = block {
     final core::List<core::List<core::int*>*>* #t237 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1)) {
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = ( block {
         final core::Set<core::List<core::int*>*>* #t238 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
-        #t238.{core::Set::add}(<core::int*>[]);
+        #t238.{core::Set::add}{Invariant}(<core::int*>[]);
       } =>#t238).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t239 = :sync-for-iterator.{core::Iterator::current};
-        #t237.{core::List::add}(#t239);
+        #t237.{core::List::add}{Invariant}(#t239);
       }
     }
   } =>#t237;
@@ -1777,14 +1777,14 @@
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1)) {
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = ( block {
         final core::Set<core::List<core::int*>*>* #t241 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
-        #t241.{core::Set::add}(<core::int*>[]);
+        #t241.{core::Set::add}{Invariant}(<core::int*>[]);
       } =>#t241).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t242 = :sync-for-iterator.{core::Iterator::current};
-        #t240.{core::Set::add}(#t242);
+        #t240.{core::Set::add}{Invariant}(#t242);
       }
     }
-    #t240.{core::Set::add}(null);
+    #t240.{core::Set::add}{Invariant}(null);
   } =>#t240;
   core::List<core::List<core::int*>*>* list42 = block {
     final core::List<core::List<core::int*>*>* #t243 = <core::List<core::int*>*>[];
@@ -1793,7 +1793,7 @@
         core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::List<core::int*>* #t244 = :sync-for-iterator.{core::Iterator::current};
-          #t243.{core::List::add}(#t244);
+          #t243.{core::List::add}{Invariant}(#t244);
         }
       }
   } =>#t243;
@@ -1804,10 +1804,10 @@
         core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::List<core::int*>* #t246 = :sync-for-iterator.{core::Iterator::current};
-          #t245.{core::Set::add}(#t246);
+          #t245.{core::Set::add}{Invariant}(#t246);
         }
       }
-    #t245.{core::Set::add}(null);
+    #t245.{core::Set::add}{Invariant}(null);
   } =>#t245;
   core::Map<core::String*, core::List<core::int*>*>* map42 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t247 = <core::String*, core::List<core::int*>*>{};
@@ -1816,10 +1816,10 @@
         core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, core::List<core::int*>*>* #t248 = :sync-for-iterator.{core::Iterator::current};
-          #t247.{core::Map::[]=}(#t248.{core::MapEntry::key}, #t248.{core::MapEntry::value});
+          #t247.{core::Map::[]=}{Invariant}(#t248.{core::MapEntry::key}, #t248.{core::MapEntry::value});
         }
       }
-    #t247.{core::Map::[]=}("baz", null);
+    #t247.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t247;
   core::List<core::int*>* list50 = block {
     final core::List<core::int*>* #t249 = <core::int*>[];
@@ -1827,7 +1827,7 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t250 = :sync-for-iterator.{core::Iterator::current};
-        #t249.{core::List::add}(#t250);
+        #t249.{core::List::add}{Invariant}(#t250);
       }
     }
   } =>#t249;
@@ -1837,10 +1837,10 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t252 = :sync-for-iterator.{core::Iterator::current};
-        #t251.{core::Set::add}(#t252);
+        #t251.{core::Set::add}{Invariant}(#t252);
       }
     }
-    #t251.{core::Set::add}(null);
+    #t251.{core::Set::add}{Invariant}(null);
   } =>#t251;
   core::Map<core::String*, core::int*>* map50 = block {
     final core::Map<core::String*, core::int*>* #t253 = <core::String*, core::int*>{};
@@ -1848,10 +1848,10 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = <core::String*, core::int*>{}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::int*>* #t254 = :sync-for-iterator.{core::Iterator::current};
-        #t253.{core::Map::[]=}(#t254.{core::MapEntry::key}, #t254.{core::MapEntry::value});
+        #t253.{core::Map::[]=}{Invariant}(#t254.{core::MapEntry::key}, #t254.{core::MapEntry::value});
       }
     }
-    #t253.{core::Map::[]=}("baz", null);
+    #t253.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t253;
   core::List<core::int*>* list51 = block {
     final core::List<core::int*>* #t255 = <core::int*>[];
@@ -1861,7 +1861,7 @@
       } =>#t256).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t257 = :sync-for-iterator.{core::Iterator::current};
-        #t255.{core::List::add}(#t257);
+        #t255.{core::List::add}{Invariant}(#t257);
       }
     }
   } =>#t255;
@@ -1873,10 +1873,10 @@
       } =>#t259).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t260 = :sync-for-iterator.{core::Iterator::current};
-        #t258.{core::Set::add}(#t260);
+        #t258.{core::Set::add}{Invariant}(#t260);
       }
     }
-    #t258.{core::Set::add}(null);
+    #t258.{core::Set::add}{Invariant}(null);
   } =>#t258;
   core::List<core::int*>* list52 = block {
     final core::List<core::int*>* #t261 = <core::int*>[];
@@ -1885,7 +1885,7 @@
         core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::int* #t262 = :sync-for-iterator.{core::Iterator::current};
-          #t261.{core::List::add}(#t262);
+          #t261.{core::List::add}{Invariant}(#t262);
         }
       }
   } =>#t261;
@@ -1896,10 +1896,10 @@
         core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::int* #t264 = :sync-for-iterator.{core::Iterator::current};
-          #t263.{core::Set::add}(#t264);
+          #t263.{core::Set::add}{Invariant}(#t264);
         }
       }
-    #t263.{core::Set::add}(null);
+    #t263.{core::Set::add}{Invariant}(null);
   } =>#t263;
   core::List<core::List<core::int*>*>* list60 = block {
     final core::List<core::List<core::int*>*>* #t265 = <core::List<core::int*>*>[];
@@ -1907,7 +1907,7 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t266 = :sync-for-iterator.{core::Iterator::current};
-        #t265.{core::List::add}(#t266);
+        #t265.{core::List::add}{Invariant}(#t266);
       }
     }
   } =>#t265;
@@ -1917,10 +1917,10 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t268 = :sync-for-iterator.{core::Iterator::current};
-        #t267.{core::Set::add}(#t268);
+        #t267.{core::Set::add}{Invariant}(#t268);
       }
     }
-    #t267.{core::Set::add}(null);
+    #t267.{core::Set::add}{Invariant}(null);
   } =>#t267;
   core::Map<core::String*, core::List<core::int*>*>* map60 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t269 = <core::String*, core::List<core::int*>*>{};
@@ -1928,10 +1928,10 @@
       core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::List<core::int*>*>* #t270 = :sync-for-iterator.{core::Iterator::current};
-        #t269.{core::Map::[]=}(#t270.{core::MapEntry::key}, #t270.{core::MapEntry::value});
+        #t269.{core::Map::[]=}{Invariant}(#t270.{core::MapEntry::key}, #t270.{core::MapEntry::value});
       }
     }
-    #t269.{core::Map::[]=}("baz", null);
+    #t269.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t269;
   core::List<core::List<core::int*>*>* list61 = block {
     final core::List<core::List<core::int*>*>* #t271 = <core::List<core::int*>*>[];
@@ -1940,7 +1940,7 @@
         core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::List<core::int*>* #t272 = :sync-for-iterator.{core::Iterator::current};
-          #t271.{core::List::add}(#t272);
+          #t271.{core::List::add}{Invariant}(#t272);
         }
       }
   } =>#t271;
@@ -1951,10 +1951,10 @@
         core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::List<core::int*>* #t274 = :sync-for-iterator.{core::Iterator::current};
-          #t273.{core::Set::add}(#t274);
+          #t273.{core::Set::add}{Invariant}(#t274);
         }
       }
-    #t273.{core::Set::add}(null);
+    #t273.{core::Set::add}{Invariant}(null);
   } =>#t273;
   core::Map<core::String*, core::List<core::int*>*>* map61 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t275 = <core::String*, core::List<core::int*>*>{};
@@ -1963,73 +1963,73 @@
         core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, core::List<core::int*>*>* #t276 = :sync-for-iterator.{core::Iterator::current};
-          #t275.{core::Map::[]=}(#t276.{core::MapEntry::key}, #t276.{core::MapEntry::value});
+          #t275.{core::Map::[]=}{Invariant}(#t276.{core::MapEntry::key}, #t276.{core::MapEntry::value});
         }
       }
-    #t275.{core::Map::[]=}("baz", null);
+    #t275.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t275;
   core::List<core::List<core::int*>*>* list70 = block {
     final core::List<core::List<core::int*>*>* #t277 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t277.{core::List::add}(<core::int*>[]);
+      #t277.{core::List::add}{Invariant}(<core::int*>[]);
   } =>#t277;
   core::Set<core::List<core::int*>*>* set70 = block {
     final core::Set<core::List<core::int*>*>* #t278 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t278.{core::Set::add}(<core::int*>[]);
-    #t278.{core::Set::add}(null);
+      #t278.{core::Set::add}{Invariant}(<core::int*>[]);
+    #t278.{core::Set::add}{Invariant}(null);
   } =>#t278;
   core::Map<core::String*, core::List<core::int*>*>* map70 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t279 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t279.{core::Map::[]=}("bar", <core::int*>[]);
-    #t279.{core::Map::[]=}("baz", null);
+      #t279.{core::Map::[]=}{Invariant}("bar", <core::int*>[]);
+    #t279.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t279;
   core::List<core::List<core::int*>*>* list71 = block {
     final core::List<core::List<core::int*>*>* #t280 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t280.{core::List::add}(<core::int*>[]);
+        #t280.{core::List::add}{Invariant}(<core::int*>[]);
   } =>#t280;
   core::Set<core::List<core::int*>*>* set71 = block {
     final core::Set<core::List<core::int*>*>* #t281 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t281.{core::Set::add}(<core::int*>[]);
-    #t281.{core::Set::add}(null);
+        #t281.{core::Set::add}{Invariant}(<core::int*>[]);
+    #t281.{core::Set::add}{Invariant}(null);
   } =>#t281;
   core::Map<core::String*, core::List<core::int*>*>* map71 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t282 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t282.{core::Map::[]=}("bar", <core::int*>[]);
-    #t282.{core::Map::[]=}("baz", null);
+        #t282.{core::Map::[]=}{Invariant}("bar", <core::int*>[]);
+    #t282.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t282;
   core::List<core::num*>* list80 = block {
     final core::List<core::num*>* #t283 = <core::num*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t283.{core::List::add}(42);
+        #t283.{core::List::add}{Invariant}(42);
       else
-        #t283.{core::List::add}(3.14);
+        #t283.{core::List::add}{Invariant}(3.14);
   } =>#t283;
   core::Set<core::num*>* set80 = block {
     final core::Set<core::num*>* #t284 = new col::_CompactLinkedHashSet::•<core::num*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t284.{core::Set::add}(42);
+        #t284.{core::Set::add}{Invariant}(42);
       else
-        #t284.{core::Set::add}(3.14);
-    #t284.{core::Set::add}(null);
+        #t284.{core::Set::add}{Invariant}(3.14);
+    #t284.{core::Set::add}{Invariant}(null);
   } =>#t284;
   core::Map<core::String*, core::num*>* map80 = block {
     final core::Map<core::String*, core::num*>* #t285 = <core::String*, core::num*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t285.{core::Map::[]=}("bar", 42);
+        #t285.{core::Map::[]=}{Invariant}("bar", 42);
       else
-        #t285.{core::Map::[]=}("bar", 3.14);
-    #t285.{core::Map::[]=}("baz", null);
+        #t285.{core::Map::[]=}{Invariant}("bar", 3.14);
+    #t285.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t285;
   core::List<core::num*>* list81 = block {
     final core::List<core::num*>* #t286 = <core::num*>[];
@@ -2038,14 +2038,14 @@
         core::Iterator<core::int*>* :sync-for-iterator = listInt.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::num* #t287 = :sync-for-iterator.{core::Iterator::current};
-          #t286.{core::List::add}(#t287);
+          #t286.{core::List::add}{Invariant}(#t287);
         }
       }
       else {
         core::Iterator<core::double*>* :sync-for-iterator = listDouble.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::num* #t288 = :sync-for-iterator.{core::Iterator::current};
-          #t286.{core::List::add}(#t288);
+          #t286.{core::List::add}{Invariant}(#t288);
         }
       }
   } =>#t286;
@@ -2056,17 +2056,17 @@
         core::Iterator<core::int*>* :sync-for-iterator = listInt.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::num* #t290 = :sync-for-iterator.{core::Iterator::current};
-          #t289.{core::Set::add}(#t290);
+          #t289.{core::Set::add}{Invariant}(#t290);
         }
       }
       else {
         core::Iterator<core::double*>* :sync-for-iterator = listDouble.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::num* #t291 = :sync-for-iterator.{core::Iterator::current};
-          #t289.{core::Set::add}(#t291);
+          #t289.{core::Set::add}{Invariant}(#t291);
         }
       }
-    #t289.{core::Set::add}(null);
+    #t289.{core::Set::add}{Invariant}(null);
   } =>#t289;
   core::Map<core::String*, core::num*>* map81 = block {
     final core::Map<core::String*, core::num*>* #t292 = <core::String*, core::num*>{};
@@ -2075,17 +2075,17 @@
         core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapStringInt.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, core::num*>* #t293 = :sync-for-iterator.{core::Iterator::current};
-          #t292.{core::Map::[]=}(#t293.{core::MapEntry::key}, #t293.{core::MapEntry::value});
+          #t292.{core::Map::[]=}{Invariant}(#t293.{core::MapEntry::key}, #t293.{core::MapEntry::value});
         }
       }
       else {
         core::Iterator<core::MapEntry<core::String*, core::double*>>* :sync-for-iterator = mapStringDouble.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, core::num*>* #t294 = :sync-for-iterator.{core::Iterator::current};
-          #t292.{core::Map::[]=}(#t294.{core::MapEntry::key}, #t294.{core::MapEntry::value});
+          #t292.{core::Map::[]=}{Invariant}(#t294.{core::MapEntry::key}, #t294.{core::MapEntry::value});
         }
       }
-    #t292.{core::Map::[]=}("baz", null);
+    #t292.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t292;
   core::List<dynamic>* list82 = block {
     final core::List<dynamic>* #t295 = <dynamic>[];
@@ -2094,14 +2094,14 @@
         core::Iterator<core::int*>* :sync-for-iterator = listInt.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final dynamic #t296 = :sync-for-iterator.{core::Iterator::current};
-          #t295.{core::List::add}(#t296);
+          #t295.{core::List::add}{Invariant}(#t296);
         }
       }
       else {
         core::Iterator<dynamic>* :sync-for-iterator = (dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final dynamic #t297 = :sync-for-iterator.{core::Iterator::current};
-          #t295.{core::List::add}(#t297);
+          #t295.{core::List::add}{Invariant}(#t297);
         }
       }
   } =>#t295;
@@ -2112,17 +2112,17 @@
         core::Iterator<core::int*>* :sync-for-iterator = listInt.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final dynamic #t299 = :sync-for-iterator.{core::Iterator::current};
-          #t298.{core::Set::add}(#t299);
+          #t298.{core::Set::add}{Invariant}(#t299);
         }
       }
       else {
         core::Iterator<dynamic>* :sync-for-iterator = (dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final dynamic #t300 = :sync-for-iterator.{core::Iterator::current};
-          #t298.{core::Set::add}(#t300);
+          #t298.{core::Set::add}{Invariant}(#t300);
         }
       }
-    #t298.{core::Set::add}(null);
+    #t298.{core::Set::add}{Invariant}(null);
   } =>#t298;
   core::Map<dynamic, dynamic>* map82 = block {
     final core::Map<dynamic, dynamic>* #t301 = <dynamic, dynamic>{};
@@ -2131,28 +2131,28 @@
         core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapStringInt.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<dynamic, dynamic>* #t302 = :sync-for-iterator.{core::Iterator::current};
-          #t301.{core::Map::[]=}(#t302.{core::MapEntry::key}, #t302.{core::MapEntry::value});
+          #t301.{core::Map::[]=}{Invariant}(#t302.{core::MapEntry::key}, #t302.{core::MapEntry::value});
         }
       }
       else {
         core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = (dynVar as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<dynamic, dynamic>* #t303 = :sync-for-iterator.{core::Iterator::current};
-          #t301.{core::Map::[]=}(#t303.{core::MapEntry::key}, #t303.{core::MapEntry::value});
+          #t301.{core::Map::[]=}{Invariant}(#t303.{core::MapEntry::key}, #t303.{core::MapEntry::value});
         }
       }
-    #t301.{core::Map::[]=}("baz", null);
+    #t301.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t301;
   core::List<core::num*>* list83 = block {
     final core::List<core::num*>* #t304 = <core::num*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t304.{core::List::add}(42);
+        #t304.{core::List::add}{Invariant}(42);
       else {
         core::Iterator<core::double*>* :sync-for-iterator = listDouble.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::num* #t305 = :sync-for-iterator.{core::Iterator::current};
-          #t304.{core::List::add}(#t305);
+          #t304.{core::List::add}{Invariant}(#t305);
         }
       }
   } =>#t304;
@@ -2163,12 +2163,12 @@
         core::Iterator<core::int*>* :sync-for-iterator = listInt.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::num* #t307 = :sync-for-iterator.{core::Iterator::current};
-          #t306.{core::Set::add}(#t307);
+          #t306.{core::Set::add}{Invariant}(#t307);
         }
       }
       else
-        #t306.{core::Set::add}(3.14);
-    #t306.{core::Set::add}(null);
+        #t306.{core::Set::add}{Invariant}(3.14);
+    #t306.{core::Set::add}{Invariant}(null);
   } =>#t306;
   core::Map<core::String*, core::num*>* map83 = block {
     final core::Map<core::String*, core::num*>* #t308 = <core::String*, core::num*>{};
@@ -2177,29 +2177,29 @@
         core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapStringInt.{core::Map::entries}.{core::Iterable::iterator};
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           final core::MapEntry<core::String*, core::num*>* #t309 = :sync-for-iterator.{core::Iterator::current};
-          #t308.{core::Map::[]=}(#t309.{core::MapEntry::key}, #t309.{core::MapEntry::value});
+          #t308.{core::Map::[]=}{Invariant}(#t309.{core::MapEntry::key}, #t309.{core::MapEntry::value});
         }
       }
       else
-        #t308.{core::Map::[]=}("bar", 3.14);
-    #t308.{core::Map::[]=}("baz", null);
+        #t308.{core::Map::[]=}{Invariant}("bar", 3.14);
+    #t308.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t308;
   core::List<core::int*>* list90 = block {
     final core::List<core::int*>* #t310 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t310.{core::List::add}(dynVar as{TypeError,ForDynamic} core::int*);
+      #t310.{core::List::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*);
   } =>#t310;
   core::Set<core::int*>* set90 = block {
     final core::Set<core::int*>* #t311 = new col::_CompactLinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t311.{core::Set::add}(dynVar as{TypeError,ForDynamic} core::int*);
-    #t311.{core::Set::add}(null);
+      #t311.{core::Set::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*);
+    #t311.{core::Set::add}{Invariant}(null);
   } =>#t311;
   core::Map<core::String*, core::int*>* map90 = block {
     final core::Map<core::String*, core::int*>* #t312 = <core::String*, core::int*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t312.{core::Map::[]=}("bar", dynVar as{TypeError,ForDynamic} core::int*);
-    #t312.{core::Map::[]=}("baz", null);
+      #t312.{core::Map::[]=}{Invariant}("bar", dynVar as{TypeError,ForDynamic} core::int*);
+    #t312.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t312;
   core::List<core::int*>* list91 = block {
     final core::List<core::int*>* #t313 = <core::int*>[];
@@ -2209,7 +2209,7 @@
         final dynamic #t314 = :sync-for-iterator.{core::Iterator::current};
         {
           final core::int* #t315 = #t314 as{TypeError} core::int*;
-          #t313.{core::List::add}(#t315);
+          #t313.{core::List::add}{Invariant}(#t315);
         }
       }
     }
@@ -2222,11 +2222,11 @@
         final dynamic #t317 = :sync-for-iterator.{core::Iterator::current};
         {
           final core::int* #t318 = #t317 as{TypeError} core::int*;
-          #t316.{core::Set::add}(#t318);
+          #t316.{core::Set::add}{Invariant}(#t318);
         }
       }
     }
-    #t316.{core::Set::add}(null);
+    #t316.{core::Set::add}{Invariant}(null);
   } =>#t316;
   core::Map<core::String*, core::int*>* map91 = block {
     final core::Map<core::String*, core::int*>* #t319 = <core::String*, core::int*>{};
@@ -2237,26 +2237,26 @@
         {
           final core::String* #t321 = #t320.{core::MapEntry::key} as{TypeError} core::String*;
           final core::int* #t322 = #t320.{core::MapEntry::value} as{TypeError} core::int*;
-          #t319.{core::Map::[]=}(#t321, #t322);
+          #t319.{core::Map::[]=}{Invariant}(#t321, #t322);
         }
       }
     }
-    #t319.{core::Map::[]=}("baz", null);
+    #t319.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t319;
   core::List<core::int*>* list100 = block {
     final core::List<core::int*>* #t323 = <core::int*>[];
     for (final core::int* #t324 = index = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; index = index.{core::num::+}(1))
-      #t323.{core::List::add}(42);
+      #t323.{core::List::add}{Invariant}(42);
   } =>#t323;
   core::Set<core::int*>* set100 = block {
     final core::Set<core::int*>* #t325 = new col::_CompactLinkedHashSet::•<core::int*>();
     for (final core::int* #t326 = index = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; index = index.{core::num::+}(1))
-      #t325.{core::Set::add}(42);
+      #t325.{core::Set::add}{Invariant}(42);
   } =>#t325;
   core::Map<core::String*, core::int*>* map100 = block {
     final core::Map<core::String*, core::int*>* #t327 = <core::String*, core::int*>{};
     for (final core::int* #t328 = index = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; index = index.{core::num::+}(1))
-      #t327.{core::Map::[]=}("bar", 42);
+      #t327.{core::Map::[]=}{Invariant}("bar", 42);
   } =>#t327;
   core::List<core::int*>* list110 = block {
     final core::List<core::int*>* #t329 = <core::int*>[];
@@ -2264,7 +2264,7 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[1, 2, 3].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
-        #t329.{core::List::add}(i);
+        #t329.{core::List::add}{Invariant}(i);
       }
     }
   } =>#t329;
@@ -2274,10 +2274,10 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[1, 2, 3].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
-        #t330.{core::Set::add}(i);
+        #t330.{core::Set::add}{Invariant}(i);
       }
     }
-    #t330.{core::Set::add}(null);
+    #t330.{core::Set::add}{Invariant}(null);
   } =>#t330;
   core::Map<core::String*, core::int*>* map110 = block {
     final core::Map<core::String*, core::int*>* #t331 = <core::String*, core::int*>{};
@@ -2285,10 +2285,10 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[1, 2, 3].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
-        #t331.{core::Map::[]=}("bar", i);
+        #t331.{core::Map::[]=}{Invariant}("bar", i);
       }
     }
-    #t331.{core::Map::[]=}("baz", null);
+    #t331.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t331;
   core::List<core::int*>* list120 = block {
     final core::List<core::int*>* #t332 = <core::int*>[];
@@ -2296,7 +2296,7 @@
       core::Iterator<dynamic>* :sync-for-iterator = (dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         dynamic i = :sync-for-iterator.{core::Iterator::current};
-        #t332.{core::List::add}(i as{TypeError,ForDynamic} core::int*);
+        #t332.{core::List::add}{Invariant}(i as{TypeError,ForDynamic} core::int*);
       }
     }
   } =>#t332;
@@ -2306,10 +2306,10 @@
       core::Iterator<dynamic>* :sync-for-iterator = (dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         dynamic i = :sync-for-iterator.{core::Iterator::current};
-        #t333.{core::Set::add}(i as{TypeError,ForDynamic} core::int*);
+        #t333.{core::Set::add}{Invariant}(i as{TypeError,ForDynamic} core::int*);
       }
     }
-    #t333.{core::Set::add}(null);
+    #t333.{core::Set::add}{Invariant}(null);
   } =>#t333;
   core::Map<core::String*, core::int*>* map120 = block {
     final core::Map<core::String*, core::int*>* #t334 = <core::String*, core::int*>{};
@@ -2317,25 +2317,25 @@
       core::Iterator<dynamic>* :sync-for-iterator = (dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         dynamic i = :sync-for-iterator.{core::Iterator::current};
-        #t334.{core::Map::[]=}("bar", i as{TypeError,ForDynamic} core::int*);
+        #t334.{core::Map::[]=}{Invariant}("bar", i as{TypeError,ForDynamic} core::int*);
       }
     }
-    #t334.{core::Map::[]=}("baz", null);
+    #t334.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t334;
   core::List<core::int*>* list130 = block {
     final core::List<core::int*>* #t335 = <core::int*>[];
     for (core::int* i = 1; i.{core::num::<}(2); i = i.{core::num::+}(1))
-      #t335.{core::List::add}(i);
+      #t335.{core::List::add}{Invariant}(i);
   } =>#t335;
   core::Set<core::int*>* set130 = block {
     final core::Set<core::int*>* #t336 = new col::_CompactLinkedHashSet::•<core::int*>();
     for (core::int* i = 1; i.{core::num::<}(2); i = i.{core::num::+}(1))
-      #t336.{core::Set::add}(i);
+      #t336.{core::Set::add}{Invariant}(i);
   } =>#t336;
   core::Map<core::int*, core::int*>* map130 = block {
     final core::Map<core::int*, core::int*>* #t337 = <core::int*, core::int*>{};
     for (core::int* i = 1; i.{core::num::<}(2); i = i.{core::num::+}(1))
-      #t337.{core::Map::[]=}(i, i);
+      #t337.{core::Map::[]=}{Invariant}(i, i);
   } =>#t337;
 }
 static method testForElementErrors(core::Map<core::int*, core::int*>* map, core::List<core::int*>* list) → dynamic /* originally async */ {
@@ -2358,27 +2358,27 @@
         block {
           final core::List<core::int*>* #t338 = <core::int*>[];
           for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-            #t338.{core::List::add}(let final<BottomType> #t339 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:210:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+            #t338.{core::List::add}{Invariant}(let final<BottomType> #t339 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:210:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>[for (int i = 0; oracle(\"foo\"); i++) \"bar\"];
                                             ^" in "bar" as{TypeError} core::int*);
         } =>#t338;
         block {
           final core::Set<core::int*>* #t340 = new col::_CompactLinkedHashSet::•<core::int*>();
           for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-            #t340.{core::Set::add}(let final<BottomType> #t341 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:211:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+            #t340.{core::Set::add}{Invariant}(let final<BottomType> #t341 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:211:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\", null};
                                             ^" in "bar" as{TypeError} core::int*);
-          #t340.{core::Set::add}(null);
+          #t340.{core::Set::add}{Invariant}(null);
         } =>#t340;
         block {
           final core::Map<core::int*, core::int*>* #t342 = <core::int*, core::int*>{};
           for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-            #t342.{core::Map::[]=}(let final<BottomType> #t343 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:212:50: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+            #t342.{core::Map::[]=}{Invariant}(let final<BottomType> #t343 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:212:50: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
                                                  ^" in "bar" as{TypeError} core::int*, let final<BottomType> #t344 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:212:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
                                                         ^" in "bar" as{TypeError} core::int*);
-          #t342.{core::Map::[]=}(let final<BottomType> #t345 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:212:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+          #t342.{core::Map::[]=}{Invariant}(let final<BottomType> #t345 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:212:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
                                                                ^" in "baz" as{TypeError} core::int*, null);
         } =>#t342;
@@ -2390,7 +2390,7 @@
                                                 ^" in "bar" as{TypeError} core::int*].{core::Iterable::iterator};
             for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
               final core::int* #t348 = :sync-for-iterator.{core::Iterator::current};
-              #t346.{core::List::add}(#t348);
+              #t346.{core::List::add}{Invariant}(#t348);
             }
           }
         } =>#t346;
@@ -2402,10 +2402,10 @@
                                                 ^" in "bar" as{TypeError} core::int*].{core::Iterable::iterator};
             for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
               final core::int* #t351 = :sync-for-iterator.{core::Iterator::current};
-              #t349.{core::Set::add}(#t351);
+              #t349.{core::Set::add}{Invariant}(#t351);
             }
           }
-          #t349.{core::Set::add}(null);
+          #t349.{core::Set::add}{Invariant}(null);
         } =>#t349;
         block {
           final core::Map<core::int*, core::int*>* #t352 = <core::int*, core::int*>{};
@@ -2417,17 +2417,17 @@
                                                             ^" in "bar" as{TypeError} core::int*}.{core::Map::entries}.{core::Iterable::iterator};
             for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
               final core::MapEntry<core::int*, core::int*>* #t355 = :sync-for-iterator.{core::Iterator::current};
-              #t352.{core::Map::[]=}(#t355.{core::MapEntry::key}, #t355.{core::MapEntry::value});
+              #t352.{core::Map::[]=}{Invariant}(#t355.{core::MapEntry::key}, #t355.{core::MapEntry::value});
             }
           }
-          #t352.{core::Map::[]=}(let final<BottomType> #t356 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:215:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+          #t352.{core::Map::[]=}{Invariant}(let final<BottomType> #t356 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:215:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
                                                                     ^" in "baz" as{TypeError} core::int*, null);
         } =>#t352;
         block {
           final core::List<core::int*>* #t357 = <core::int*>[];
           for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-            #t357.{core::List::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:216:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+            #t357.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:216:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[for (int i = 0; oracle(\"foo\"); i++) ...map];
                                                ^");
@@ -2435,11 +2435,11 @@
         block {
           final core::Set<core::int*>* #t358 = new col::_CompactLinkedHashSet::•<core::int*>();
           for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-            #t358.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:217:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+            #t358.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:217:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{for (int i = 0; oracle(\"foo\"); i++) ...map, null};
                                                ^");
-          #t358.{core::Set::add}(null);
+          #t358.{core::Set::add}{Invariant}(null);
         } =>#t358;
         <core::int*, core::int*>{invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:218:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -2452,11 +2452,11 @@
           final core::List<core::String*>* #t359 = <core::String*>[];
           for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
             if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-              #t359.{core::List::add}(let final<BottomType> #t360 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:219:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+              #t359.{core::List::add}{Invariant}(let final<BottomType> #t360 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:219:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14];
                                                              ^" in 42 as{TypeError} core::String*);
             else
-              #t359.{core::List::add}(let final<BottomType> #t361 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:219:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+              #t359.{core::List::add}{Invariant}(let final<BottomType> #t361 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:219:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14];
                                                                      ^" in 3.14 as{TypeError} core::String*);
         } =>#t359;
@@ -2464,50 +2464,50 @@
           final core::Set<core::String*>* #t362 = new col::_CompactLinkedHashSet::•<core::String*>();
           for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
             if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-              #t362.{core::Set::add}(let final<BottomType> #t363 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:220:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+              #t362.{core::Set::add}{Invariant}(let final<BottomType> #t363 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:220:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14, null};
                                                              ^" in 42 as{TypeError} core::String*);
             else
-              #t362.{core::Set::add}(let final<BottomType> #t364 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:220:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+              #t362.{core::Set::add}{Invariant}(let final<BottomType> #t364 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:220:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14, null};
                                                                      ^" in 3.14 as{TypeError} core::String*);
-          #t362.{core::Set::add}(null);
+          #t362.{core::Set::add}{Invariant}(null);
         } =>#t362;
         block {
           final core::Map<core::String*, core::String*>* #t365 = <core::String*, core::String*>{};
           for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
             if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-              #t365.{core::Map::[]=}("bar", let final<BottomType> #t366 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:221:77: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+              #t365.{core::Map::[]=}{Invariant}("bar", let final<BottomType> #t366 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:221:77: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String, String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else \"bar\": 3.14, \"baz\": null};
                                                                             ^" in 42 as{TypeError} core::String*);
             else
-              #t365.{core::Map::[]=}("bar", let final<BottomType> #t367 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:221:92: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+              #t365.{core::Map::[]=}{Invariant}("bar", let final<BottomType> #t367 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:221:92: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String, String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else \"bar\": 3.14, \"baz\": null};
                                                                                            ^" in 3.14 as{TypeError} core::String*);
-          #t365.{core::Map::[]=}("baz", null);
+          #t365.{core::Map::[]=}{Invariant}("baz", null);
         } =>#t365;
         block {
           final core::List<core::int*>* #t368 = <core::int*>[];
           for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
             if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-              #t368.{core::List::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:222:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+              #t368.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:222:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...map else 42];
                                                              ^");
             else
-              #t368.{core::List::add}(42);
+              #t368.{core::List::add}{Invariant}(42);
         } =>#t368;
         block {
           final core::Set<core::int*>* #t369 = new col::_CompactLinkedHashSet::•<core::int*>();
           for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
             if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-              #t369.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:223:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+              #t369.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:223:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...map else 42, null};
                                                              ^");
             else
-              #t369.{core::Set::add}(42);
-          #t369.{core::Set::add}(null);
+              #t369.{core::Set::add}{Invariant}(42);
+          #t369.{core::Set::add}{Invariant}(null);
         } =>#t369;
         <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:224:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -2520,9 +2520,9 @@
           final core::List<core::int*>* #t370 = <core::int*>[];
           for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
             if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-              #t370.{core::List::add}(42);
+              #t370.{core::List::add}{Invariant}(42);
             else
-              #t370.{core::List::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:225:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+              #t370.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:225:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else ...map];
                                                                      ^");
@@ -2531,13 +2531,13 @@
           final core::Set<core::int*>* #t371 = new col::_CompactLinkedHashSet::•<core::int*>();
           for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
             if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-              #t371.{core::Set::add}(42);
+              #t371.{core::Set::add}{Invariant}(42);
             else
-              #t371.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:226:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+              #t371.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:226:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else ...map, null};
                                                                      ^");
-          #t371.{core::Set::add}(null);
+          #t371.{core::Set::add}{Invariant}(null);
         } =>#t371;
         <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:227:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -2557,7 +2557,7 @@
                 invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:230:14: Error: Can't assign to the final variable 'i'.
   <int>[for (i in <int>[1]) i];
              ^";
-                #t372.{core::List::add}(i);
+                #t372.{core::List::add}{Invariant}(i);
               }
             }
           }
@@ -2572,11 +2572,11 @@
                 invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:231:14: Error: Can't assign to the final variable 'i'.
   <int>{for (i in <int>[1]) i, null};
              ^";
-                #t374.{core::Set::add}(i);
+                #t374.{core::Set::add}{Invariant}(i);
               }
             }
           }
-          #t374.{core::Set::add}(null);
+          #t374.{core::Set::add}{Invariant}(null);
         } =>#t374;
         block {
           final core::Map<core::String*, core::int*>* #t376 = <core::String*, core::int*>{};
@@ -2588,11 +2588,11 @@
                 invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:232:21: Error: Can't assign to the final variable 'i'.
 \t<String, int>{for (i in <int>[1]) \"bar\": i, \"baz\": null};
 \t                   ^";
-                #t376.{core::Map::[]=}("bar", i);
+                #t376.{core::Map::[]=}{Invariant}("bar", i);
               }
             }
           }
-          #t376.{core::Map::[]=}("baz", null);
+          #t376.{core::Map::[]=}{Invariant}("baz", null);
         } =>#t376;
         core::List<dynamic>* list10 = block {
           final core::List<dynamic>* #t378 = <dynamic>[];
@@ -2603,7 +2603,7 @@
                               ^" in "not iterable" as{TypeError} core::Iterable<dynamic>*).{core::Iterable::iterator};
             for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
               dynamic i = :sync-for-iterator.{core::Iterator::current};
-              #t378.{core::List::add}(i);
+              #t378.{core::List::add}{Invariant}(i);
             }
           }
         } =>#t378;
@@ -2616,10 +2616,10 @@
                              ^" in "not iterable" as{TypeError} core::Iterable<dynamic>*).{core::Iterable::iterator};
             for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
               dynamic i = :sync-for-iterator.{core::Iterator::current};
-              #t380.{core::Set::add}(i);
+              #t380.{core::Set::add}{Invariant}(i);
             }
           }
-          #t380.{core::Set::add}(null);
+          #t380.{core::Set::add}{Invariant}(null);
         } =>#t380;
         core::Map<core::String*, dynamic>* map10 = block {
           final core::Map<core::String*, dynamic>* #t382 = <core::String*, dynamic>{};
@@ -2630,10 +2630,10 @@
                              ^" in "not iterable" as{TypeError} core::Iterable<dynamic>*).{core::Iterable::iterator};
             for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
               dynamic i = :sync-for-iterator.{core::Iterator::current};
-              #t382.{core::Map::[]=}("bar", i);
+              #t382.{core::Map::[]=}{Invariant}("bar", i);
             }
           }
-          #t382.{core::Map::[]=}("baz", null);
+          #t382.{core::Map::[]=}{Invariant}("baz", null);
         } =>#t382;
         core::List<core::int*>* list20 = block {
           final core::List<core::int*>* #t384 = <core::int*>[];
@@ -2645,7 +2645,7 @@
                                       ^" in "int" as{TypeError} core::int*].{core::Iterable::iterator};
             for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
               core::int* i = :sync-for-iterator.{core::Iterator::current};
-              #t384.{core::List::add}(i);
+              #t384.{core::List::add}{Invariant}(i);
             }
           }
         } =>#t384;
@@ -2659,10 +2659,10 @@
                                      ^" in "int" as{TypeError} core::int*].{core::Iterable::iterator};
             for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
               core::int* i = :sync-for-iterator.{core::Iterator::current};
-              #t387.{core::Set::add}(i);
+              #t387.{core::Set::add}{Invariant}(i);
             }
           }
-          #t387.{core::Set::add}(null);
+          #t387.{core::Set::add}{Invariant}(null);
         } =>#t387;
         core::Map<core::String*, core::int*>* map20 = block {
           final core::Map<core::String*, core::int*>* #t390 = <core::String*, core::int*>{};
@@ -2674,10 +2674,10 @@
                                      ^" in "int" as{TypeError} core::int*].{core::Iterable::iterator};
             for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
               core::int* i = :sync-for-iterator.{core::Iterator::current};
-              #t390.{core::Map::[]=}("bar", i);
+              #t390.{core::Map::[]=}{Invariant}("bar", i);
             }
           }
-          #t390.{core::Map::[]=}("baz", null);
+          #t390.{core::Map::[]=}{Invariant}("baz", null);
         } =>#t390;
         final core::List<dynamic>* #t393 = <dynamic>[];
         {
@@ -2693,7 +2693,7 @@
               [yield] let dynamic #t396 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
               if(_in::unsafeCast<core::bool>(:result)) {
                 dynamic i = :for-iterator.{asy::_StreamIterator::current};
-                #t393.{core::List::add}(i);
+                #t393.{core::List::add}{Invariant}(i);
               }
               else
                 break #L2;
@@ -2719,7 +2719,7 @@
               [yield] let dynamic #t401 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
               if(_in::unsafeCast<core::bool>(:result)) {
                 dynamic i = :for-iterator.{asy::_StreamIterator::current};
-                #t398.{core::Set::add}(i);
+                #t398.{core::Set::add}{Invariant}(i);
               }
               else
                 break #L3;
@@ -2731,7 +2731,7 @@
             }
         }
         core::Set<dynamic>* set30 = block {
-          #t398.{core::Set::add}(null);
+          #t398.{core::Set::add}{Invariant}(null);
         } =>#t398;
         final core::Map<core::String*, dynamic>* #t403 = <core::String*, dynamic>{};
         {
@@ -2747,7 +2747,7 @@
               [yield] let dynamic #t406 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
               if(_in::unsafeCast<core::bool>(:result)) {
                 dynamic i = :for-iterator.{asy::_StreamIterator::current};
-                #t403.{core::Map::[]=}("bar", i);
+                #t403.{core::Map::[]=}{Invariant}("bar", i);
               }
               else
                 break #L4;
@@ -2759,7 +2759,7 @@
             }
         }
         core::Map<core::String*, dynamic>* map30 = block {
-          #t403.{core::Map::[]=}("baz", null);
+          #t403.{core::Map::[]=}{Invariant}("baz", null);
         } =>#t403;
         final core::List<core::int*>* #t408 = <core::int*>[];
         {
@@ -2776,7 +2776,7 @@
               [yield] let dynamic #t412 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
               if(_in::unsafeCast<core::bool>(:result)) {
                 core::int* i = :for-iterator.{asy::_StreamIterator::current};
-                #t408.{core::List::add}(i);
+                #t408.{core::List::add}{Invariant}(i);
               }
               else
                 break #L5;
@@ -2803,7 +2803,7 @@
               [yield] let dynamic #t418 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
               if(_in::unsafeCast<core::bool>(:result)) {
                 core::int* i = :for-iterator.{asy::_StreamIterator::current};
-                #t414.{core::Set::add}(i);
+                #t414.{core::Set::add}{Invariant}(i);
               }
               else
                 break #L6;
@@ -2815,7 +2815,7 @@
             }
         }
         core::Set<core::int*>* set40 = block {
-          #t414.{core::Set::add}(null);
+          #t414.{core::Set::add}{Invariant}(null);
         } =>#t414;
         final core::Map<core::String*, core::int*>* #t420 = <core::String*, core::int*>{};
         {
@@ -2832,7 +2832,7 @@
               [yield] let dynamic #t424 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
               if(_in::unsafeCast<core::bool>(:result)) {
                 core::int* i = :for-iterator.{asy::_StreamIterator::current};
-                #t420.{core::Map::[]=}("bar", i);
+                #t420.{core::Map::[]=}{Invariant}("bar", i);
               }
               else
                 break #L7;
@@ -2844,47 +2844,47 @@
             }
         }
         core::Map<core::String*, core::int*>* map40 = block {
-          #t420.{core::Map::[]=}("baz", null);
+          #t420.{core::Map::[]=}{Invariant}("baz", null);
         } =>#t420;
         core::List<core::int*>* list50 = block {
           final core::List<core::int*>* #t426 = <core::int*>[];
           for (; ; )
-            #t426.{core::List::add}(42);
+            #t426.{core::List::add}{Invariant}(42);
         } =>#t426;
         core::Set<core::int*>* set50 = block {
           final core::Set<core::int*>* #t427 = new col::_CompactLinkedHashSet::•<core::int*>();
           for (; ; )
-            #t427.{core::Set::add}(42);
-          #t427.{core::Set::add}(null);
+            #t427.{core::Set::add}{Invariant}(42);
+          #t427.{core::Set::add}{Invariant}(null);
         } =>#t427;
         core::Map<core::String*, core::int*>* map50 = block {
           final core::Map<core::String*, core::int*>* #t428 = <core::String*, core::int*>{};
           for (; ; )
-            #t428.{core::Map::[]=}("bar", 42);
-          #t428.{core::Map::[]=}("baz", null);
+            #t428.{core::Map::[]=}{Invariant}("bar", 42);
+          #t428.{core::Map::[]=}{Invariant}("baz", null);
         } =>#t428;
         core::List<core::int*>* list60 = block {
           final core::List<core::int*>* #t429 = <core::int*>[];
           for (; let final<BottomType> #t430 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:249:24: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
   var list60 = [for (; \"not bool\";) 42];
                        ^" in "not bool" as{TypeError} core::bool*; )
-            #t429.{core::List::add}(42);
+            #t429.{core::List::add}{Invariant}(42);
         } =>#t429;
         core::Set<core::int*>* set60 = block {
           final core::Set<core::int*>* #t431 = new col::_CompactLinkedHashSet::•<core::int*>();
           for (; let final<BottomType> #t432 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:250:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
   var set60 = {for (; \"not bool\";) 42, null};
                       ^" in "not bool" as{TypeError} core::bool*; )
-            #t431.{core::Set::add}(42);
-          #t431.{core::Set::add}(null);
+            #t431.{core::Set::add}{Invariant}(42);
+          #t431.{core::Set::add}{Invariant}(null);
         } =>#t431;
         core::Map<core::String*, core::int*>* map60 = block {
           final core::Map<core::String*, core::int*>* #t433 = <core::String*, core::int*>{};
           for (; let final<BottomType> #t434 = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:251:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
   var map60 = {for (; \"not bool\";) \"bar\": 42, \"baz\": null};
                       ^" in "not bool" as{TypeError} core::bool*; )
-            #t433.{core::Map::[]=}("bar", 42);
-          #t433.{core::Map::[]=}("baz", null);
+            #t433.{core::Map::[]=}{Invariant}("bar", 42);
+          #t433.{core::Map::[]=}{Invariant}("baz", null);
         } =>#t433;
       }
       asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync);
@@ -2904,34 +2904,34 @@
   block {
     final core::List<core::int*>* #t435 = <core::int*>[];
     await for (core::int* i in stream)
-      #t435.{core::List::add}(i);
+      #t435.{core::List::add}{Invariant}(i);
   } =>#t435;
   block {
     final core::Set<core::int*>* #t436 = new col::_CompactLinkedHashSet::•<core::int*>();
     await for (core::int* i in stream)
-      #t436.{core::Set::add}(i);
+      #t436.{core::Set::add}{Invariant}(i);
   } =>#t436;
   block {
     final core::Map<core::String*, core::int*>* #t437 = <core::String*, core::int*>{};
     await for (core::int* i in stream)
-      #t437.{core::Map::[]=}("bar", i);
+      #t437.{core::Map::[]=}{Invariant}("bar", i);
   } =>#t437;
 }
 static method testPromotion(self::A* a) → dynamic {
   core::List<core::int*>* list10 = block {
     final core::List<core::int*>* #t438 = <core::int*>[];
     if(a is self::B*)
-      #t438.{core::List::add}(a{self::B*}.{self::B::foo});
+      #t438.{core::List::add}{Invariant}(a{self::B*}.{self::B::foo});
   } =>#t438;
   core::Set<core::int*>* set10 = block {
     final core::Set<core::int*>* #t439 = new col::_CompactLinkedHashSet::•<core::int*>();
     if(a is self::B*)
-      #t439.{core::Set::add}(a{self::B*}.{self::B::foo});
+      #t439.{core::Set::add}{Invariant}(a{self::B*}.{self::B::foo});
   } =>#t439;
   core::Map<core::int*, core::int*>* map10 = block {
     final core::Map<core::int*, core::int*>* #t440 = <core::int*, core::int*>{};
     if(a is self::B*)
-      #t440.{core::Map::[]=}(a{self::B*}.{self::B::foo}, a{self::B*}.{self::B::foo});
+      #t440.{core::Map::[]=}{Invariant}(a{self::B*}.{self::B::foo}, a{self::B*}.{self::B::foo});
   } =>#t440;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/if_null_in_set_literal.dart.strong.expect b/pkg/front_end/testcases/general/if_null_in_set_literal.dart.strong.expect
index cf3316a..bbc6109 100644
--- a/pkg/front_end/testcases/general/if_null_in_set_literal.dart.strong.expect
+++ b/pkg/front_end/testcases/general/if_null_in_set_literal.dart.strong.expect
@@ -8,6 +8,6 @@
   core::Object* b;
   return block {
     final core::Set<core::Object*>* #t1 = col::LinkedHashSet::•<core::Object*>();
-    #t1.{core::Set::add}(let final core::Object* #t2 = a in #t2.{core::Object::==}(null) ?{core::Object*} b : #t2);
+    #t1.{core::Set::add}{Invariant}(let final core::Object* #t2 = a in #t2.{core::Object::==}(null) ?{core::Object*} b : #t2);
   } =>#t1;
 }
diff --git a/pkg/front_end/testcases/general/if_null_in_set_literal.dart.strong.transformed.expect b/pkg/front_end/testcases/general/if_null_in_set_literal.dart.strong.transformed.expect
index d304f46..637e41b 100644
--- a/pkg/front_end/testcases/general/if_null_in_set_literal.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/if_null_in_set_literal.dart.strong.transformed.expect
@@ -8,6 +8,6 @@
   core::Object* b;
   return block {
     final core::Set<core::Object*>* #t1 = new col::_CompactLinkedHashSet::•<core::Object*>();
-    #t1.{core::Set::add}(let final core::Object* #t2 = a in #t2.{core::Object::==}(null) ?{core::Object*} b : #t2);
+    #t1.{core::Set::add}{Invariant}(let final core::Object* #t2 = a in #t2.{core::Object::==}(null) ?{core::Object*} b : #t2);
   } =>#t1;
 }
diff --git a/pkg/front_end/testcases/general/issue31767.dart b/pkg/front_end/testcases/general/issue31767.dart
new file mode 100644
index 0000000..045dced
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue31767.dart
@@ -0,0 +1,61 @@
+// Copyright (c) 2020, 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.
+
+// @dart=2.9
+
+import 'issue31767_lib.dart';
+
+StringBuffer sb;
+
+class C {
+  final int w;
+  C.foo(int x, [int y = 0, int z = 0]) : w = p("x", x) + p("y", y) + p("z", z);
+}
+
+int p(String name, int value) {
+  sb.write("$name = $value, ");
+  return value;
+}
+
+mixin M on C {
+  int get w2 => w * w;
+}
+
+class D = C with M;
+
+mixin N on A {
+  int get w2 => w * w;
+}
+
+class E = A with N;
+
+main() {
+  sb = new StringBuffer();
+  var a = A.foo(1, 2);
+  expect('x = 1, y = 2, z = 3, ', sb.toString());
+  expect(6, a.w);
+  expect(5, a.a.field);
+
+  sb = new StringBuffer();
+  var c = C.foo(1, 2);
+  expect('x = 1, y = 2, z = 0, ', sb.toString());
+  expect(3, c.w);
+
+  sb = new StringBuffer();
+  var d = D.foo(1, 2);
+  expect('x = 1, y = 2, z = 0, ', sb.toString());
+  expect(3, d.w);
+  expect(9, d.w2);
+
+  sb = new StringBuffer();
+  var e = E.foo(1, 2);
+  expect('x = 1, y = 2, z = 3, ', sb.toString());
+  expect(6, e.w);
+  expect(36, e.w2);
+  expect(5, e.a.field);
+}
+
+expect(expected, actual) {
+  if (expected != actual) throw 'Expected $expected, actual $actual';
+}
diff --git a/pkg/front_end/testcases/general/issue31767.dart.outline.expect b/pkg/front_end/testcases/general/issue31767.dart.outline.expect
new file mode 100644
index 0000000..adbdb2c
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue31767.dart.outline.expect
@@ -0,0 +1,87 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "issue31767_lib.dart" as iss;
+
+import "org-dartlang-testcase:///issue31767_lib.dart";
+
+class C extends core::Object {
+  final field core::int* w;
+  constructor foo(core::int* x, [core::int* y, core::int* z]) → self::C*
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+abstract class M extends self::C /*isMixinDeclaration*/  {
+  get w2() → core::int*
+    ;
+}
+class D = self::C with self::M {
+  synthetic constructor foo(core::int* x, [core::int* y, core::int* z]) → self::D*
+    : super self::C::foo(x, y, z)
+    ;
+}
+abstract class N extends iss::A /*isMixinDeclaration*/  {
+  get w2() → core::int*
+    ;
+}
+class E = iss::A with self::N {
+  synthetic constructor foo(core::int* x, [core::int* y, core::int* z, iss::_A* a]) → self::E*
+    : super iss::A::foo(x, y, z, a)
+    ;
+}
+static field core::StringBuffer* sb;
+static method p(core::String* name, core::int* value) → core::int*
+  ;
+static method main() → dynamic
+  ;
+static method expect(dynamic expected, dynamic actual) → dynamic
+  ;
+
+library;
+import self as iss;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue31767.dart";
+
+class A extends core::Object {
+  final field core::int* w;
+  final field iss::_A* a;
+  constructor foo(core::int* x, [core::int* y, core::int* z, iss::_A* a]) → iss::A*
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+class _A extends core::Object /*hasConstConstructor*/  {
+  final field core::int* field;
+  const constructor •(core::int* field) → iss::_A*
+    : iss::_A::field = field, super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+static const field core::int* _private = 3;
diff --git a/pkg/front_end/testcases/general/issue31767.dart.strong.expect b/pkg/front_end/testcases/general/issue31767.dart.strong.expect
new file mode 100644
index 0000000..66290c1
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue31767.dart.strong.expect
@@ -0,0 +1,121 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "issue31767_lib.dart" as iss;
+
+import "org-dartlang-testcase:///issue31767_lib.dart";
+
+class C extends core::Object {
+  final field core::int* w;
+  constructor foo(core::int* x, [core::int* y = #C1, core::int* z = #C1]) → self::C*
+    : self::C::w = self::p("x", x).{core::num::+}(self::p("y", y)).{core::num::+}(self::p("z", z)), super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+abstract class M extends self::C /*isMixinDeclaration*/  {
+  get w2() → core::int*
+    return this.{self::C::w}.{core::num::*}(this.{self::C::w});
+}
+class D = self::C with self::M {
+  synthetic constructor foo(core::int* x, [core::int* y = #C1, core::int* z = #C1]) → self::D*
+    : super self::C::foo(x, y, z)
+    ;
+}
+abstract class N extends iss::A /*isMixinDeclaration*/  {
+  get w2() → core::int*
+    return this.{iss::A::w}.{core::num::*}(this.{iss::A::w});
+}
+class E = iss::A with self::N {
+  synthetic constructor foo(core::int* x, [core::int* y = #C2, core::int* z = #C2, iss::_A* a = #C4]) → self::E*
+    : super iss::A::foo(x, y, z, a)
+    ;
+}
+static field core::StringBuffer* sb;
+static method p(core::String* name, core::int* value) → core::int* {
+  self::sb.{core::StringBuffer::write}("${name} = ${value}, ");
+  return value;
+}
+static method main() → dynamic {
+  self::sb = new core::StringBuffer::•();
+  iss::A* a = new iss::A::foo(1, 2);
+  self::expect("x = 1, y = 2, z = 3, ", self::sb.{core::StringBuffer::toString}());
+  self::expect(6, a.{iss::A::w});
+  self::expect(5, a.{iss::A::a}.{iss::_A::field});
+  self::sb = new core::StringBuffer::•();
+  self::C* c = new self::C::foo(1, 2);
+  self::expect("x = 1, y = 2, z = 0, ", self::sb.{core::StringBuffer::toString}());
+  self::expect(3, c.{self::C::w});
+  self::sb = new core::StringBuffer::•();
+  self::D* d = new self::D::foo(1, 2);
+  self::expect("x = 1, y = 2, z = 0, ", self::sb.{core::StringBuffer::toString}());
+  self::expect(3, d.{self::C::w});
+  self::expect(9, d.{self::M::w2});
+  self::sb = new core::StringBuffer::•();
+  self::E* e = new self::E::foo(1, 2);
+  self::expect("x = 1, y = 2, z = 3, ", self::sb.{core::StringBuffer::toString}());
+  self::expect(6, e.{iss::A::w});
+  self::expect(36, e.{self::N::w2});
+  self::expect(5, e.{iss::A::a}.{iss::_A::field});
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual))
+    throw "Expected ${expected}, actual ${actual}";
+}
+
+library;
+import self as iss;
+import "dart:core" as core;
+import "issue31767.dart" as self;
+
+import "org-dartlang-testcase:///issue31767.dart";
+
+class A extends core::Object {
+  final field core::int* w;
+  final field iss::_A* a;
+  constructor foo(core::int* x, [core::int* y = #C2, core::int* z = #C2, iss::_A* a = #C4]) → iss::A*
+    : iss::A::a = a, iss::A::w = self::p("x", x).{core::num::+}(self::p("y", y)).{core::num::+}(self::p("z", z)), super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+class _A extends core::Object /*hasConstConstructor*/  {
+  final field core::int* field;
+  const constructor •(core::int* field) → iss::_A*
+    : iss::_A::field = field, super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+static const field core::int* _private = #C2;
+
+constants  {
+  #C1 = 0
+  #C2 = 3
+  #C3 = 5
+  #C4 = iss::_A {field:#C3}
+}
diff --git a/pkg/front_end/testcases/general/issue31767.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue31767.dart.strong.transformed.expect
new file mode 100644
index 0000000..19fdcee
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue31767.dart.strong.transformed.expect
@@ -0,0 +1,125 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "issue31767_lib.dart" as iss;
+
+import "org-dartlang-testcase:///issue31767_lib.dart";
+
+class C extends core::Object {
+  final field core::int* w;
+  constructor foo(core::int* x, [core::int* y = #C1, core::int* z = #C1]) → self::C*
+    : self::C::w = self::p("x", x).{core::num::+}(self::p("y", y)).{core::num::+}(self::p("z", z)), super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+abstract class M extends self::C /*isMixinDeclaration*/  {
+  get w2() → core::int*
+    return this.{self::C::w}.{core::num::*}(this.{self::C::w});
+}
+class D extends self::C implements self::M /*isEliminatedMixin*/  {
+  synthetic constructor foo(core::int* x, [core::int* y = #C1, core::int* z = #C1]) → self::D*
+    : super self::C::foo(x, y, z)
+    ;
+  get w2() → core::int*
+    return this.{self::C::w}.{core::num::*}(this.{self::C::w});
+}
+abstract class N extends iss::A /*isMixinDeclaration*/  {
+  get w2() → core::int*
+    return this.{iss::A::w}.{core::num::*}(this.{iss::A::w});
+}
+class E extends iss::A implements self::N /*isEliminatedMixin*/  {
+  synthetic constructor foo(core::int* x, [core::int* y = #C2, core::int* z = #C2, iss::_A* a = #C4]) → self::E*
+    : super iss::A::foo(x, y, z, a)
+    ;
+  get w2() → core::int*
+    return this.{iss::A::w}.{core::num::*}(this.{iss::A::w});
+}
+static field core::StringBuffer* sb;
+static method p(core::String* name, core::int* value) → core::int* {
+  self::sb.{core::StringBuffer::write}("${name} = ${value}, ");
+  return value;
+}
+static method main() → dynamic {
+  self::sb = new core::StringBuffer::•();
+  iss::A* a = new iss::A::foo(1, 2);
+  self::expect("x = 1, y = 2, z = 3, ", self::sb.{core::StringBuffer::toString}());
+  self::expect(6, a.{iss::A::w});
+  self::expect(5, a.{iss::A::a}.{iss::_A::field});
+  self::sb = new core::StringBuffer::•();
+  self::C* c = new self::C::foo(1, 2);
+  self::expect("x = 1, y = 2, z = 0, ", self::sb.{core::StringBuffer::toString}());
+  self::expect(3, c.{self::C::w});
+  self::sb = new core::StringBuffer::•();
+  self::D* d = new self::D::foo(1, 2);
+  self::expect("x = 1, y = 2, z = 0, ", self::sb.{core::StringBuffer::toString}());
+  self::expect(3, d.{self::C::w});
+  self::expect(9, d.{self::M::w2});
+  self::sb = new core::StringBuffer::•();
+  self::E* e = new self::E::foo(1, 2);
+  self::expect("x = 1, y = 2, z = 3, ", self::sb.{core::StringBuffer::toString}());
+  self::expect(6, e.{iss::A::w});
+  self::expect(36, e.{self::N::w2});
+  self::expect(5, e.{iss::A::a}.{iss::_A::field});
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual))
+    throw "Expected ${expected}, actual ${actual}";
+}
+
+library;
+import self as iss;
+import "dart:core" as core;
+import "issue31767.dart" as self;
+
+import "org-dartlang-testcase:///issue31767.dart";
+
+class A extends core::Object {
+  final field core::int* w;
+  final field iss::_A* a;
+  constructor foo(core::int* x, [core::int* y = #C2, core::int* z = #C2, iss::_A* a = #C4]) → iss::A*
+    : iss::A::a = a, iss::A::w = self::p("x", x).{core::num::+}(self::p("y", y)).{core::num::+}(self::p("z", z)), super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+class _A extends core::Object /*hasConstConstructor*/  {
+  final field core::int* field;
+  const constructor •(core::int* field) → iss::_A*
+    : iss::_A::field = field, super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+static const field core::int* _private = #C2;
+
+constants  {
+  #C1 = 0
+  #C2 = 3
+  #C3 = 5
+  #C4 = iss::_A {field:#C3}
+}
diff --git a/pkg/front_end/testcases/general/issue31767.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue31767.dart.textual_outline.expect
new file mode 100644
index 0000000..c0f1050
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue31767.dart.textual_outline.expect
@@ -0,0 +1,21 @@
+// @dart = 2.9
+import 'issue31767_lib.dart';
+
+StringBuffer sb;
+
+class C {
+  final int w;
+  C.foo(int x, [int y = 0, int z = 0]) : w = p("x", x) + p("y", y) + p("z", z);
+}
+
+int p(String name, int value) {}
+mixin M on C {
+  int get w2 => w * w;
+}
+class D = C with M;
+mixin N on A {
+  int get w2 => w * w;
+}
+class E = A with N;
+main() {}
+expect(expected, actual) {}
diff --git a/pkg/front_end/testcases/general/issue31767.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue31767.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..e349691
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue31767.dart.textual_outline_modelled.expect
@@ -0,0 +1,21 @@
+// @dart = 2.9
+import 'issue31767_lib.dart';
+
+StringBuffer sb;
+
+class C {
+  C.foo(int x, [int y = 0, int z = 0]) : w = p("x", x) + p("y", y) + p("z", z);
+  final int w;
+}
+
+class D = C with M;
+class E = A with N;
+expect(expected, actual) {}
+int p(String name, int value) {}
+main() {}
+mixin M on C {
+  int get w2 => w * w;
+}
+mixin N on A {
+  int get w2 => w * w;
+}
diff --git a/pkg/front_end/testcases/general/issue31767_lib.dart b/pkg/front_end/testcases/general/issue31767_lib.dart
new file mode 100644
index 0000000..61406fd
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue31767_lib.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2020, 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.
+
+// @dart=2.9
+
+import 'issue31767.dart';
+
+const int _private = 3;
+
+class A {
+  final int w;
+  final _A a;
+  A.foo(int x, [int y = _private, int z = _private, this.a = const _A(5)])
+      : w = p("x", x) + p("y", y) + p("z", z);
+}
+
+class _A {
+  final int field;
+  const _A(this.field);
+}
diff --git a/pkg/front_end/testcases/general/issue37027.dart.strong.expect b/pkg/front_end/testcases/general/issue37027.dart.strong.expect
index 09fd889..d66702b 100644
--- a/pkg/front_end/testcases/general/issue37027.dart.strong.expect
+++ b/pkg/front_end/testcases/general/issue37027.dart.strong.expect
@@ -10,7 +10,7 @@
       final core::Set<core::int*>* #t1 = col::LinkedHashSet::•<core::int*>();
       for (core::int* e in ell)
         if(e.{core::int::isOdd})
-          #t1.{core::Set::add}(2.{core::num::*}(e));
+          #t1.{core::Set::add}{Invariant}(2.{core::num::*}(e));
     } =>#t1, super core::Object::•()
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/general/issue37027.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue37027.dart.strong.transformed.expect
index bc72e7f..fa88301 100644
--- a/pkg/front_end/testcases/general/issue37027.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/issue37027.dart.strong.transformed.expect
@@ -13,7 +13,7 @@
         for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
           core::int* e = :sync-for-iterator.{core::Iterator::current};
           if(e.{core::int::isOdd})
-            #t1.{core::Set::add}(2.{core::num::*}(e));
+            #t1.{core::Set::add}{Invariant}(2.{core::num::*}(e));
         }
       }
     } =>#t1, super core::Object::•()
diff --git a/pkg/front_end/testcases/general/null_aware_spread.dart.strong.expect b/pkg/front_end/testcases/general/null_aware_spread.dart.strong.expect
index b724b3a..bd5bf0d 100644
--- a/pkg/front_end/testcases/general/null_aware_spread.dart.strong.expect
+++ b/pkg/front_end/testcases/general/null_aware_spread.dart.strong.expect
@@ -6,31 +6,31 @@
 static method nullAwareListSpread(core::List<core::String*>* list) → dynamic {
   list = block {
     final core::List<core::String*>* #t1 = <core::String*>[];
-    #t1.{core::List::add}("foo");
+    #t1.{core::List::add}{Invariant}("foo");
     final core::Iterable<core::String*>* #t2 = list;
     if(!#t2.{core::Object::==}(null))
       for (final core::String* #t3 in #t2)
-        #t1.{core::List::add}(#t3);
+        #t1.{core::List::add}{Invariant}(#t3);
   } =>#t1;
 }
 static method nullAwareSetSpread(core::Set<core::String*>* set) → dynamic {
   set = block {
     final core::Set<core::String*>* #t4 = col::LinkedHashSet::•<core::String*>();
-    #t4.{core::Set::add}("foo");
+    #t4.{core::Set::add}{Invariant}("foo");
     final core::Iterable<core::String*>* #t5 = set;
     if(!#t5.{core::Object::==}(null))
       for (final core::String* #t6 in #t5)
-        #t4.{core::Set::add}(#t6);
+        #t4.{core::Set::add}{Invariant}(#t6);
   } =>#t4;
 }
 static method nullAwareMapSpread(core::Map<core::int*, core::String*>* map) → dynamic {
   map = block {
     final core::Map<core::int*, core::String*>* #t7 = <core::int*, core::String*>{};
-    #t7.{core::Map::[]=}(0, "foo");
+    #t7.{core::Map::[]=}{Invariant}(0, "foo");
     final core::Map<core::int*, core::String*>* #t8 = map;
     if(!#t8.{core::Object::==}(null))
       for (final core::MapEntry<core::int*, core::String*>* #t9 in #t8.{core::Map::entries})
-        #t7.{core::Map::[]=}(#t9.{core::MapEntry::key}, #t9.{core::MapEntry::value});
+        #t7.{core::Map::[]=}{Invariant}(#t9.{core::MapEntry::key}, #t9.{core::MapEntry::value});
   } =>#t7;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/general/null_aware_spread.dart.strong.transformed.expect b/pkg/front_end/testcases/general/null_aware_spread.dart.strong.transformed.expect
index 9ff4788..67a6d44 100644
--- a/pkg/front_end/testcases/general/null_aware_spread.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/null_aware_spread.dart.strong.transformed.expect
@@ -6,13 +6,13 @@
 static method nullAwareListSpread(core::List<core::String*>* list) → dynamic {
   list = block {
     final core::List<core::String*>* #t1 = <core::String*>[];
-    #t1.{core::List::add}("foo");
+    #t1.{core::List::add}{Invariant}("foo");
     final core::Iterable<core::String*>* #t2 = list;
     if(!#t2.{core::Object::==}(null)) {
       core::Iterator<core::String*>* :sync-for-iterator = #t2.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::String* #t3 = :sync-for-iterator.{core::Iterator::current};
-        #t1.{core::List::add}(#t3);
+        #t1.{core::List::add}{Invariant}(#t3);
       }
     }
   } =>#t1;
@@ -20,13 +20,13 @@
 static method nullAwareSetSpread(core::Set<core::String*>* set) → dynamic {
   set = block {
     final core::Set<core::String*>* #t4 = new col::_CompactLinkedHashSet::•<core::String*>();
-    #t4.{core::Set::add}("foo");
+    #t4.{core::Set::add}{Invariant}("foo");
     final core::Iterable<core::String*>* #t5 = set;
     if(!#t5.{core::Object::==}(null)) {
       core::Iterator<core::String*>* :sync-for-iterator = #t5.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::String* #t6 = :sync-for-iterator.{core::Iterator::current};
-        #t4.{core::Set::add}(#t6);
+        #t4.{core::Set::add}{Invariant}(#t6);
       }
     }
   } =>#t4;
@@ -34,13 +34,13 @@
 static method nullAwareMapSpread(core::Map<core::int*, core::String*>* map) → dynamic {
   map = block {
     final core::Map<core::int*, core::String*>* #t7 = <core::int*, core::String*>{};
-    #t7.{core::Map::[]=}(0, "foo");
+    #t7.{core::Map::[]=}{Invariant}(0, "foo");
     final core::Map<core::int*, core::String*>* #t8 = map;
     if(!#t8.{core::Object::==}(null)) {
       core::Iterator<core::MapEntry<core::int*, core::String*>>* :sync-for-iterator = #t8.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::int*, core::String*>* #t9 = :sync-for-iterator.{core::Iterator::current};
-        #t7.{core::Map::[]=}(#t9.{core::MapEntry::key}, #t9.{core::MapEntry::value});
+        #t7.{core::Map::[]=}{Invariant}(#t9.{core::MapEntry::key}, #t9.{core::MapEntry::value});
       }
     }
   } =>#t7;
diff --git a/pkg/front_end/testcases/general/spread_collection.dart.strong.expect b/pkg/front_end/testcases/general/spread_collection.dart.strong.expect
index 08204f6..45566e9 100644
--- a/pkg/front_end/testcases/general/spread_collection.dart.strong.expect
+++ b/pkg/front_end/testcases/general/spread_collection.dart.strong.expect
@@ -14,33 +14,33 @@
 static method main() → dynamic {
   final core::List<core::int*>* aList = block {
     final core::List<core::int*>* #t1 = <core::int*>[];
-    #t1.{core::List::add}(1);
+    #t1.{core::List::add}{Invariant}(1);
     for (final core::int* #t2 in <core::int*>[2])
-      #t1.{core::List::add}(#t2);
+      #t1.{core::List::add}{Invariant}(#t2);
     final core::Iterable<core::int*>* #t3 = <core::int*>[3];
     if(!#t3.{core::Object::==}(null))
       for (final core::int* #t4 in #t3)
-        #t1.{core::List::add}(#t4);
+        #t1.{core::List::add}{Invariant}(#t4);
   } =>#t1;
   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);
+    #t5.{core::Map::[]=}{Invariant}(1, 1);
     for (final core::MapEntry<core::int*, core::int*>* #t6 in <core::int*, core::int*>{2: 2}.{core::Map::entries})
-      #t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
+      #t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
     final core::Map<core::int*, core::int*>* #t7 = <core::int*, core::int*>{3: 3};
     if(!#t7.{core::Object::==}(null))
       for (final core::MapEntry<core::int*, core::int*>* #t8 in #t7.{core::Map::entries})
-        #t5.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
+        #t5.{core::Map::[]=}{Invariant}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
   } =>#t5;
   final core::Set<core::int*>* aSet = block {
     final core::Set<core::int*>* #t9 = col::LinkedHashSet::•<core::int*>();
-    #t9.{core::Set::add}(1);
+    #t9.{core::Set::add}{Invariant}(1);
     for (final core::int* #t10 in <core::int*>[2])
-      #t9.{core::Set::add}(#t10);
+      #t9.{core::Set::add}{Invariant}(#t10);
     final core::Iterable<core::int*>* #t11 = <core::int*>[3];
     if(!#t11.{core::Object::==}(null))
       for (final core::int* #t12 in #t11)
-        #t9.{core::Set::add}(#t12);
+        #t9.{core::Set::add}{Invariant}(#t12);
   } =>#t9;
   final dynamic aSetOrMap = invalid-expression "pkg/front_end/testcases/general/spread_collection.dart:21:21: Error: Not enough type information to disambiguate between literal set and literal map.
 Try providing type arguments for the literal explicitly to disambiguate it.
diff --git a/pkg/front_end/testcases/general/spread_collection.dart.strong.transformed.expect b/pkg/front_end/testcases/general/spread_collection.dart.strong.transformed.expect
index 15ed3cf..d6d75a5 100644
--- a/pkg/front_end/testcases/general/spread_collection.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/spread_collection.dart.strong.transformed.expect
@@ -14,12 +14,12 @@
 static method main() → dynamic {
   final core::List<core::int*>* aList = block {
     final core::List<core::int*>* #t1 = <core::int*>[];
-    #t1.{core::List::add}(1);
+    #t1.{core::List::add}{Invariant}(1);
     {
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[2].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t2 = :sync-for-iterator.{core::Iterator::current};
-        #t1.{core::List::add}(#t2);
+        #t1.{core::List::add}{Invariant}(#t2);
       }
     }
     final core::Iterable<core::int*>* #t3 = <core::int*>[3];
@@ -27,18 +27,18 @@
       core::Iterator<core::int*>* :sync-for-iterator = #t3.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t4 = :sync-for-iterator.{core::Iterator::current};
-        #t1.{core::List::add}(#t4);
+        #t1.{core::List::add}{Invariant}(#t4);
       }
     }
   } =>#t1;
   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);
+    #t5.{core::Map::[]=}{Invariant}(1, 1);
     {
       core::Iterator<core::MapEntry<core::int*, core::int*>>* :sync-for-iterator = <core::int*, core::int*>{2: 2}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::int*, core::int*>* #t6 = :sync-for-iterator.{core::Iterator::current};
-        #t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
+        #t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
       }
     }
     final core::Map<core::int*, core::int*>* #t7 = <core::int*, core::int*>{3: 3};
@@ -46,18 +46,18 @@
       core::Iterator<core::MapEntry<core::int*, core::int*>>* :sync-for-iterator = #t7.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::int*, core::int*>* #t8 = :sync-for-iterator.{core::Iterator::current};
-        #t5.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
+        #t5.{core::Map::[]=}{Invariant}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
       }
     }
   } =>#t5;
   final core::Set<core::int*>* aSet = block {
     final core::Set<core::int*>* #t9 = new col::_CompactLinkedHashSet::•<core::int*>();
-    #t9.{core::Set::add}(1);
+    #t9.{core::Set::add}{Invariant}(1);
     {
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[2].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t10 = :sync-for-iterator.{core::Iterator::current};
-        #t9.{core::Set::add}(#t10);
+        #t9.{core::Set::add}{Invariant}(#t10);
       }
     }
     final core::Iterable<core::int*>* #t11 = <core::int*>[3];
@@ -65,7 +65,7 @@
       core::Iterator<core::int*>* :sync-for-iterator = #t11.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t12 = :sync-for-iterator.{core::Iterator::current};
-        #t9.{core::Set::add}(#t12);
+        #t9.{core::Set::add}{Invariant}(#t12);
       }
     }
   } =>#t9;
diff --git a/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.expect b/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.expect
index beb5aad..e2acef4 100644
--- a/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.expect
@@ -112,68 +112,68 @@
   core::List<dynamic>* lhs10 = block {
     final core::List<dynamic>* #t1 = <dynamic>[];
     for (final dynamic #t2 in <dynamic>[])
-      #t1.{core::List::add}(#t2);
+      #t1.{core::List::add}{Invariant}(#t2);
   } =>#t1;
   core::Set<dynamic>* set10 = block {
     final core::Set<dynamic>* #t3 = col::LinkedHashSet::•<dynamic>();
     for (final dynamic #t4 in <dynamic>[])
-      #t3.{core::Set::add}(#t4);
+      #t3.{core::Set::add}{Invariant}(#t4);
   } =>#t3;
   core::Map<dynamic, dynamic>* map10 = block {
     final core::Map<dynamic, dynamic>* #t5 = <dynamic, dynamic>{};
     for (final core::MapEntry<dynamic, dynamic>* #t6 in <dynamic, dynamic>{}.{core::Map::entries})
-      #t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
+      #t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
   } =>#t5;
   core::Map<dynamic, dynamic>* map10ambiguous = block {
     final core::Map<dynamic, dynamic>* #t7 = <dynamic, dynamic>{};
     for (final core::MapEntry<dynamic, dynamic>* #t8 in <dynamic, dynamic>{}.{core::Map::entries})
-      #t7.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
+      #t7.{core::Map::[]=}{Invariant}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
   } =>#t7;
   core::List<core::int*>* lhs20 = block {
     final core::List<core::int*>* #t9 = <core::int*>[];
     for (final core::int* #t10 in spread)
-      #t9.{core::List::add}(#t10);
+      #t9.{core::List::add}{Invariant}(#t10);
   } =>#t9;
   core::Set<core::int*>* set20 = block {
     final core::Set<core::int*>* #t11 = col::LinkedHashSet::•<core::int*>();
     for (final core::int* #t12 in spread)
-      #t11.{core::Set::add}(#t12);
-    #t11.{core::Set::add}(42);
+      #t11.{core::Set::add}{Invariant}(#t12);
+    #t11.{core::Set::add}{Invariant}(42);
   } =>#t11;
   core::Set<core::int*>* set20ambiguous = block {
     final core::Set<core::int*>* #t13 = col::LinkedHashSet::•<core::int*>();
     for (final dynamic #t14 in spread) {
       final core::int* #t15 = #t14 as{TypeError} core::int*;
-      #t13.{core::Set::add}(#t15);
+      #t13.{core::Set::add}{Invariant}(#t15);
     }
   } =>#t13;
   core::Map<core::String*, core::int*>* map20 = block {
     final core::Map<core::String*, core::int*>* #t16 = <core::String*, core::int*>{};
     for (final core::MapEntry<core::String*, core::int*>* #t17 in mapSpread.{core::Map::entries})
-      #t16.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
-    #t16.{core::Map::[]=}("baz", 42);
+      #t16.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
+    #t16.{core::Map::[]=}{Invariant}("baz", 42);
   } =>#t16;
   core::Map<core::String*, core::int*>* map20ambiguous = block {
     final core::Map<core::String*, core::int*>* #t18 = <core::String*, core::int*>{};
     for (final core::MapEntry<core::String*, core::int*>* #t19 in mapSpread.{core::Map::entries})
-      #t18.{core::Map::[]=}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
+      #t18.{core::Map::[]=}{Invariant}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
   } =>#t18;
   core::List<dynamic>* lhs21 = block {
     final core::List<dynamic>* #t20 = <dynamic>[];
     for (final dynamic #t21 in (spread as dynamic) as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-      #t20.{core::List::add}(#t21);
+      #t20.{core::List::add}{Invariant}(#t21);
   } =>#t20;
   core::Set<dynamic>* set21 = block {
     final core::Set<dynamic>* #t22 = col::LinkedHashSet::•<dynamic>();
     for (final dynamic #t23 in (spread as dynamic) as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-      #t22.{core::Set::add}(#t23);
-    #t22.{core::Set::add}(42);
+      #t22.{core::Set::add}{Invariant}(#t23);
+    #t22.{core::Set::add}{Invariant}(42);
   } =>#t22;
   core::Map<dynamic, dynamic>* map21 = block {
     final core::Map<dynamic, dynamic>* #t24 = <dynamic, dynamic>{};
     for (final core::MapEntry<dynamic, dynamic>* #t25 in ((mapSpread as dynamic) as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries})
-      #t24.{core::Map::[]=}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
-    #t24.{core::Map::[]=}("baz", 42);
+      #t24.{core::Map::[]=}{Invariant}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
+    #t24.{core::Map::[]=}{Invariant}("baz", 42);
   } =>#t24;
   dynamic map21ambiguous = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:64:28: Error: Not enough type information to disambiguate between literal set and literal map.
 Try providing type arguments for the literal explicitly to disambiguate it.
@@ -182,48 +182,48 @@
   core::List<core::int*>* lhs22 = block {
     final core::List<core::int*>* #t26 = <core::int*>[];
     for (final core::int* #t27 in <core::int*>[])
-      #t26.{core::List::add}(#t27);
+      #t26.{core::List::add}{Invariant}(#t27);
   } =>#t26;
   core::Set<core::int*>* set22 = block {
     final core::Set<core::int*>* #t28 = col::LinkedHashSet::•<core::int*>();
     for (final core::int* #t29 in <core::int*>[])
-      #t28.{core::Set::add}(#t29);
-    #t28.{core::Set::add}(42);
+      #t28.{core::Set::add}{Invariant}(#t29);
+    #t28.{core::Set::add}{Invariant}(42);
   } =>#t28;
   core::Set<core::int*>* set22ambiguous = block {
     final core::Set<core::int*>* #t30 = col::LinkedHashSet::•<core::int*>();
     for (final dynamic #t31 in <core::int*>[]) {
       final core::int* #t32 = #t31 as{TypeError} core::int*;
-      #t30.{core::Set::add}(#t32);
+      #t30.{core::Set::add}{Invariant}(#t32);
     }
   } =>#t30;
   core::Map<core::String*, core::int*>* map22 = block {
     final core::Map<core::String*, core::int*>* #t33 = <core::String*, core::int*>{};
     for (final core::MapEntry<core::String*, core::int*>* #t34 in <core::String*, core::int*>{}.{core::Map::entries})
-      #t33.{core::Map::[]=}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
+      #t33.{core::Map::[]=}{Invariant}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
   } =>#t33;
   core::List<core::List<core::int*>*>* lhs23 = block {
     final core::List<core::List<core::int*>*>* #t35 = <core::List<core::int*>*>[];
     for (final core::List<core::int*>* #t36 in <core::List<core::int*>*>[<core::int*>[]])
-      #t35.{core::List::add}(#t36);
+      #t35.{core::List::add}{Invariant}(#t36);
   } =>#t35;
   core::Set<core::List<core::int*>*>* set23 = block {
     final core::Set<core::List<core::int*>*>* #t37 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (final core::List<core::int*>* #t38 in <core::List<core::int*>*>[<core::int*>[]])
-      #t37.{core::Set::add}(#t38);
-    #t37.{core::Set::add}(<core::int*>[42]);
+      #t37.{core::Set::add}{Invariant}(#t38);
+    #t37.{core::Set::add}{Invariant}(<core::int*>[42]);
   } =>#t37;
   core::Set<core::List<core::int*>*>* set23ambiguous = block {
     final core::Set<core::List<core::int*>*>* #t39 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (final dynamic #t40 in <core::List<core::int*>*>[<core::int*>[]]) {
       final core::List<core::int*>* #t41 = #t40 as{TypeError} core::List<core::int*>*;
-      #t39.{core::Set::add}(#t41);
+      #t39.{core::Set::add}{Invariant}(#t41);
     }
   } =>#t39;
   core::Map<core::String*, core::List<core::int*>*>* map23 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t42 = <core::String*, core::List<core::int*>*>{};
     for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t43 in <core::String*, core::List<core::int*>*>{"baz": <core::int*>[]}.{core::Map::entries})
-      #t42.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
+      #t42.{core::Map::[]=}{Invariant}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
   } =>#t42;
   dynamic map24ambiguous = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:96:28: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
   dynamic map24ambiguous = {...spread, ...mapSpread};
@@ -234,7 +234,7 @@
                                    ^" in ( block {
     final core::List<core::int*>* #t45 = <core::int*>[];
     for (final core::int* #t46 in spread)
-      #t45.{core::List::add}(#t46);
+      #t45.{core::List::add}{Invariant}(#t46);
   } =>#t45) as{TypeError} core::int*;
   core::int* set30 = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:100:36: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
  - 'Set' is from 'dart:core'.
@@ -242,8 +242,8 @@
                                    ^" in ( block {
     final core::Set<core::int*>* #t48 = col::LinkedHashSet::•<core::int*>();
     for (final core::int* #t49 in spread)
-      #t48.{core::Set::add}(#t49);
-    #t48.{core::Set::add}(42);
+      #t48.{core::Set::add}{Invariant}(#t49);
+    #t48.{core::Set::add}{Invariant}(42);
   } =>#t48) as{TypeError} core::int*;
   core::int* set30ambiguous = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:103:7: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
  - 'Set' is from 'dart:core'.
@@ -252,7 +252,7 @@
     final core::Set<core::int*>* #t51 = col::LinkedHashSet::•<core::int*>();
     for (final dynamic #t52 in spread) {
       final core::int* #t53 = #t52 as{TypeError} core::int*;
-      #t51.{core::Set::add}(#t53);
+      #t51.{core::Set::add}{Invariant}(#t53);
     }
   } =>#t51) as{TypeError} core::int*;
   core::int* map30 = let final<BottomType> #t54 = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:106:7: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
@@ -261,8 +261,8 @@
       ^" in ( block {
     final core::Map<core::String*, core::int*>* #t55 = <core::String*, core::int*>{};
     for (final core::MapEntry<core::String*, core::int*>* #t56 in mapSpread.{core::Map::entries})
-      #t55.{core::Map::[]=}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
-    #t55.{core::Map::[]=}("baz", 42);
+      #t55.{core::Map::[]=}{Invariant}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
+    #t55.{core::Map::[]=}{Invariant}("baz", 42);
   } =>#t55) as{TypeError} core::int*;
   core::int* map30ambiguous = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:109:7: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
  - 'Map' is from 'dart:core'.
@@ -270,14 +270,14 @@
       ^" in ( block {
     final core::Map<core::String*, core::int*>* #t58 = <core::String*, core::int*>{};
     for (final core::MapEntry<core::String*, core::int*>* #t59 in mapSpread.{core::Map::entries})
-      #t58.{core::Map::[]=}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
+      #t58.{core::Map::[]=}{Invariant}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
   } =>#t58) as{TypeError} core::int*;
   core::List<dynamic>* lhs40 = <dynamic>[invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:111:38: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
   List<dynamic> lhs40 = <dynamic>[...notSpreadInt];
                                      ^"];
   core::Set<dynamic>* set40 = block {
     final core::Set<dynamic>* #t60 = col::LinkedHashSet::•<dynamic>();
-    #t60.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:113:37: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+    #t60.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:113:37: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
   Set<dynamic> set40 = <dynamic>{...notSpreadInt};
                                     ^");
   } =>#t60;
@@ -289,7 +289,7 @@
                                      ^"];
   core::Set<dynamic>* set50 = block {
     final core::Set<dynamic>* #t61 = col::LinkedHashSet::•<dynamic>();
-    #t61.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:119:37: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+    #t61.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:119:37: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
   Set<dynamic> set50 = <dynamic>{...notSpreadFunction};
                                     ^");
   } =>#t61;
@@ -301,7 +301,7 @@
                                    ^"];
   core::Set<core::String*>* set60 = block {
     final core::Set<core::String*>* #t62 = col::LinkedHashSet::•<core::String*>();
-    #t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:125:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+    #t62.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:125:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
   Set<String> set60 = <String>{...spread};
                                   ^");
   } =>#t62;
@@ -316,18 +316,18 @@
                              ^"];
   core::Set<core::int*>* set70 = block {
     final core::Set<core::int*>* #t63 = col::LinkedHashSet::•<core::int*>();
-    #t63.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type 'Null'.
+    #t63.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type 'Null'.
   Set<int> set70 = <int>{...null};
                             ^");
   } =>#t63;
   core::Set<dynamic>* set71ambiguous = block {
     final core::Set<dynamic>* #t64 = col::LinkedHashSet::•<dynamic>();
-    #t64.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:137:8: Error: Expected ',' before this.
+    #t64.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:137:8: Error: Expected ',' before this.
     ...null,
        ^");
     for (final dynamic #t65 in <dynamic>[]) {
       final dynamic #t66 = #t65 as{TypeError} dynamic;
-      #t64.{core::Set::add}(#t66);
+      #t64.{core::Set::add}{Invariant}(#t66);
     }
   } =>#t64;
   core::Map<core::String*, core::int*>* map70 = <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:142:45: Error: Can't spread a value with static type 'Null'.
@@ -338,14 +338,14 @@
     final core::Iterable<core::int*>* #t68 = null;
     if(!#t68.{core::Object::==}(null))
       for (final core::int* #t69 in #t68)
-        #t67.{core::List::add}(#t69);
+        #t67.{core::List::add}{Invariant}(#t69);
   } =>#t67;
   core::Set<core::int*>* set80 = block {
     final core::Set<core::int*>* #t70 = col::LinkedHashSet::•<core::int*>();
     final core::Iterable<core::int*>* #t71 = null;
     if(!#t71.{core::Object::==}(null))
       for (final core::int* #t72 in #t71)
-        #t70.{core::Set::add}(#t72);
+        #t70.{core::Set::add}{Invariant}(#t72);
   } =>#t70;
   core::Set<dynamic>* set81ambiguous = block {
     final core::Set<dynamic>* #t73 = col::LinkedHashSet::•<dynamic>();
@@ -353,11 +353,11 @@
     if(!#t74.{core::Object::==}(null))
       for (final dynamic #t75 in #t74) {
         final dynamic #t76 = #t75 as{TypeError} dynamic;
-        #t73.{core::Set::add}(#t76);
+        #t73.{core::Set::add}{Invariant}(#t76);
       }
     for (final dynamic #t77 in <dynamic>[]) {
       final dynamic #t78 = #t77 as{TypeError} dynamic;
-      #t73.{core::Set::add}(#t78);
+      #t73.{core::Set::add}{Invariant}(#t78);
     }
   } =>#t73;
   core::Map<core::String*, core::int*>* map80 = block {
@@ -365,18 +365,18 @@
     final core::Map<core::String*, core::int*>* #t80 = null;
     if(!#t80.{core::Object::==}(null))
       for (final core::MapEntry<core::String*, core::int*>* #t81 in #t80.{core::Map::entries})
-        #t79.{core::Map::[]=}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
+        #t79.{core::Map::[]=}{Invariant}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
   } =>#t79;
   core::Map<core::String*, core::int*>* map90 = block {
     final core::Map<core::String*, core::int*>* #t82 = <core::String*, core::int*>{};
     for (final core::MapEntry<core::String*, core::int*>* #t83 in self::bar<core::String*, core::int*>().{core::Map::entries})
-      #t82.{core::Map::[]=}(#t83.{core::MapEntry::key}, #t83.{core::MapEntry::value});
+      #t82.{core::Map::[]=}{Invariant}(#t83.{core::MapEntry::key}, #t83.{core::MapEntry::value});
   } =>#t82;
   core::List<core::int*>* list100 = block {
     final core::List<core::int*>* #t84 = <core::int*>[];
     for (final dynamic #t85 in listNum) {
       final core::int* #t86 = #t85 as{TypeError} core::int*;
-      #t84.{core::List::add}(#t86);
+      #t84.{core::List::add}{Invariant}(#t86);
     }
   } =>#t84;
   core::Map<core::num*, core::int*>* map100 = block {
@@ -384,14 +384,14 @@
     for (final core::MapEntry<dynamic, dynamic>* #t88 in mapIntNum.{core::Map::entries}) {
       final core::num* #t89 = #t88.{core::MapEntry::key} as{TypeError} core::num*;
       final core::int* #t90 = #t88.{core::MapEntry::value} as{TypeError} core::int*;
-      #t87.{core::Map::[]=}(#t89, #t90);
+      #t87.{core::Map::[]=}{Invariant}(#t89, #t90);
     }
   } =>#t87;
   core::List<core::int*>* list110 = block {
     final core::List<core::int*>* #t91 = <core::int*>[];
     for (final dynamic #t92 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*) {
       final core::int* #t93 = #t92 as{TypeError} core::int*;
-      #t91.{core::List::add}(#t93);
+      #t91.{core::List::add}{Invariant}(#t93);
     }
   } =>#t91;
   core::Map<core::num*, core::int*>* map110 = block {
@@ -399,7 +399,7 @@
     for (final core::MapEntry<dynamic, dynamic>* #t95 in (dynVar as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries}) {
       final core::num* #t96 = #t95.{core::MapEntry::key} as{TypeError} core::num*;
       final core::int* #t97 = #t95.{core::MapEntry::value} as{TypeError} core::int*;
-      #t94.{core::Map::[]=}(#t96, #t97);
+      #t94.{core::Map::[]=}{Invariant}(#t96, #t97);
     }
   } =>#t94;
 }
diff --git a/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.transformed.expect
index 5652fe4..6ecdd84 100644
--- a/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.transformed.expect
@@ -115,7 +115,7 @@
       core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t2 = :sync-for-iterator.{core::Iterator::current};
-        #t1.{core::List::add}(#t2);
+        #t1.{core::List::add}{Invariant}(#t2);
       }
     }
   } =>#t1;
@@ -125,7 +125,7 @@
       core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t4 = :sync-for-iterator.{core::Iterator::current};
-        #t3.{core::Set::add}(#t4);
+        #t3.{core::Set::add}{Invariant}(#t4);
       }
     }
   } =>#t3;
@@ -135,7 +135,7 @@
       core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = <dynamic, dynamic>{}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<dynamic, dynamic>* #t6 = :sync-for-iterator.{core::Iterator::current};
-        #t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
+        #t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
       }
     }
   } =>#t5;
@@ -145,7 +145,7 @@
       core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = <dynamic, dynamic>{}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<dynamic, dynamic>* #t8 = :sync-for-iterator.{core::Iterator::current};
-        #t7.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
+        #t7.{core::Map::[]=}{Invariant}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
       }
     }
   } =>#t7;
@@ -155,7 +155,7 @@
       core::Iterator<core::int*>* :sync-for-iterator = spread.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t10 = :sync-for-iterator.{core::Iterator::current};
-        #t9.{core::List::add}(#t10);
+        #t9.{core::List::add}{Invariant}(#t10);
       }
     }
   } =>#t9;
@@ -165,10 +165,10 @@
       core::Iterator<core::int*>* :sync-for-iterator = spread.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t12 = :sync-for-iterator.{core::Iterator::current};
-        #t11.{core::Set::add}(#t12);
+        #t11.{core::Set::add}{Invariant}(#t12);
       }
     }
-    #t11.{core::Set::add}(42);
+    #t11.{core::Set::add}{Invariant}(42);
   } =>#t11;
   core::Set<core::int*>* set20ambiguous = block {
     final core::Set<core::int*>* #t13 = new col::_CompactLinkedHashSet::•<core::int*>();
@@ -178,7 +178,7 @@
         final dynamic #t14 = :sync-for-iterator.{core::Iterator::current};
         {
           final core::int* #t15 = #t14 as{TypeError} core::int*;
-          #t13.{core::Set::add}(#t15);
+          #t13.{core::Set::add}{Invariant}(#t15);
         }
       }
     }
@@ -189,10 +189,10 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapSpread.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::int*>* #t17 = :sync-for-iterator.{core::Iterator::current};
-        #t16.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
+        #t16.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
       }
     }
-    #t16.{core::Map::[]=}("baz", 42);
+    #t16.{core::Map::[]=}{Invariant}("baz", 42);
   } =>#t16;
   core::Map<core::String*, core::int*>* map20ambiguous = block {
     final core::Map<core::String*, core::int*>* #t18 = <core::String*, core::int*>{};
@@ -200,7 +200,7 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapSpread.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::int*>* #t19 = :sync-for-iterator.{core::Iterator::current};
-        #t18.{core::Map::[]=}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
+        #t18.{core::Map::[]=}{Invariant}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
       }
     }
   } =>#t18;
@@ -210,7 +210,7 @@
       core::Iterator<dynamic>* :sync-for-iterator = ((spread as dynamic) as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t21 = :sync-for-iterator.{core::Iterator::current};
-        #t20.{core::List::add}(#t21);
+        #t20.{core::List::add}{Invariant}(#t21);
       }
     }
   } =>#t20;
@@ -220,10 +220,10 @@
       core::Iterator<dynamic>* :sync-for-iterator = ((spread as dynamic) as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final dynamic #t23 = :sync-for-iterator.{core::Iterator::current};
-        #t22.{core::Set::add}(#t23);
+        #t22.{core::Set::add}{Invariant}(#t23);
       }
     }
-    #t22.{core::Set::add}(42);
+    #t22.{core::Set::add}{Invariant}(42);
   } =>#t22;
   core::Map<dynamic, dynamic>* map21 = block {
     final core::Map<dynamic, dynamic>* #t24 = <dynamic, dynamic>{};
@@ -231,10 +231,10 @@
       core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = ((mapSpread as dynamic) as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<dynamic, dynamic>* #t25 = :sync-for-iterator.{core::Iterator::current};
-        #t24.{core::Map::[]=}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
+        #t24.{core::Map::[]=}{Invariant}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
       }
     }
-    #t24.{core::Map::[]=}("baz", 42);
+    #t24.{core::Map::[]=}{Invariant}("baz", 42);
   } =>#t24;
   dynamic map21ambiguous = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:64:28: Error: Not enough type information to disambiguate between literal set and literal map.
 Try providing type arguments for the literal explicitly to disambiguate it.
@@ -246,7 +246,7 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t27 = :sync-for-iterator.{core::Iterator::current};
-        #t26.{core::List::add}(#t27);
+        #t26.{core::List::add}{Invariant}(#t27);
       }
     }
   } =>#t26;
@@ -256,10 +256,10 @@
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t29 = :sync-for-iterator.{core::Iterator::current};
-        #t28.{core::Set::add}(#t29);
+        #t28.{core::Set::add}{Invariant}(#t29);
       }
     }
-    #t28.{core::Set::add}(42);
+    #t28.{core::Set::add}{Invariant}(42);
   } =>#t28;
   core::Set<core::int*>* set22ambiguous = block {
     final core::Set<core::int*>* #t30 = new col::_CompactLinkedHashSet::•<core::int*>();
@@ -269,7 +269,7 @@
         final dynamic #t31 = :sync-for-iterator.{core::Iterator::current};
         {
           final core::int* #t32 = #t31 as{TypeError} core::int*;
-          #t30.{core::Set::add}(#t32);
+          #t30.{core::Set::add}{Invariant}(#t32);
         }
       }
     }
@@ -280,7 +280,7 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = <core::String*, core::int*>{}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::int*>* #t34 = :sync-for-iterator.{core::Iterator::current};
-        #t33.{core::Map::[]=}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
+        #t33.{core::Map::[]=}{Invariant}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
       }
     }
   } =>#t33;
@@ -290,7 +290,7 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t36 = :sync-for-iterator.{core::Iterator::current};
-        #t35.{core::List::add}(#t36);
+        #t35.{core::List::add}{Invariant}(#t36);
       }
     }
   } =>#t35;
@@ -300,10 +300,10 @@
       core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::List<core::int*>* #t38 = :sync-for-iterator.{core::Iterator::current};
-        #t37.{core::Set::add}(#t38);
+        #t37.{core::Set::add}{Invariant}(#t38);
       }
     }
-    #t37.{core::Set::add}(<core::int*>[42]);
+    #t37.{core::Set::add}{Invariant}(<core::int*>[42]);
   } =>#t37;
   core::Set<core::List<core::int*>*>* set23ambiguous = block {
     final core::Set<core::List<core::int*>*>* #t39 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
@@ -313,7 +313,7 @@
         final dynamic #t40 = :sync-for-iterator.{core::Iterator::current};
         {
           final core::List<core::int*>* #t41 = #t40 as{TypeError} core::List<core::int*>*;
-          #t39.{core::Set::add}(#t41);
+          #t39.{core::Set::add}{Invariant}(#t41);
         }
       }
     }
@@ -324,7 +324,7 @@
       core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"baz": <core::int*>[]}.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::List<core::int*>*>* #t43 = :sync-for-iterator.{core::Iterator::current};
-        #t42.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
+        #t42.{core::Map::[]=}{Invariant}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
       }
     }
   } =>#t42;
@@ -340,7 +340,7 @@
       core::Iterator<core::int*>* :sync-for-iterator = spread.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t46 = :sync-for-iterator.{core::Iterator::current};
-        #t45.{core::List::add}(#t46);
+        #t45.{core::List::add}{Invariant}(#t46);
       }
     }
   } =>#t45) as{TypeError} core::int*;
@@ -353,10 +353,10 @@
       core::Iterator<core::int*>* :sync-for-iterator = spread.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t49 = :sync-for-iterator.{core::Iterator::current};
-        #t48.{core::Set::add}(#t49);
+        #t48.{core::Set::add}{Invariant}(#t49);
       }
     }
-    #t48.{core::Set::add}(42);
+    #t48.{core::Set::add}{Invariant}(42);
   } =>#t48) as{TypeError} core::int*;
   core::int* set30ambiguous = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:103:7: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
  - 'Set' is from 'dart:core'.
@@ -369,7 +369,7 @@
         final dynamic #t52 = :sync-for-iterator.{core::Iterator::current};
         {
           final core::int* #t53 = #t52 as{TypeError} core::int*;
-          #t51.{core::Set::add}(#t53);
+          #t51.{core::Set::add}{Invariant}(#t53);
         }
       }
     }
@@ -383,10 +383,10 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapSpread.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::int*>* #t56 = :sync-for-iterator.{core::Iterator::current};
-        #t55.{core::Map::[]=}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
+        #t55.{core::Map::[]=}{Invariant}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
       }
     }
-    #t55.{core::Map::[]=}("baz", 42);
+    #t55.{core::Map::[]=}{Invariant}("baz", 42);
   } =>#t55) as{TypeError} core::int*;
   core::int* map30ambiguous = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:109:7: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
  - 'Map' is from 'dart:core'.
@@ -397,7 +397,7 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapSpread.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::int*>* #t59 = :sync-for-iterator.{core::Iterator::current};
-        #t58.{core::Map::[]=}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
+        #t58.{core::Map::[]=}{Invariant}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
       }
     }
   } =>#t58) as{TypeError} core::int*;
@@ -406,7 +406,7 @@
                                      ^"];
   core::Set<dynamic>* set40 = block {
     final core::Set<dynamic>* #t60 = new col::_CompactLinkedHashSet::•<dynamic>();
-    #t60.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:113:37: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+    #t60.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:113:37: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
   Set<dynamic> set40 = <dynamic>{...notSpreadInt};
                                     ^");
   } =>#t60;
@@ -418,7 +418,7 @@
                                      ^"];
   core::Set<dynamic>* set50 = block {
     final core::Set<dynamic>* #t61 = new col::_CompactLinkedHashSet::•<dynamic>();
-    #t61.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:119:37: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+    #t61.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:119:37: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
   Set<dynamic> set50 = <dynamic>{...notSpreadFunction};
                                     ^");
   } =>#t61;
@@ -430,7 +430,7 @@
                                    ^"];
   core::Set<core::String*>* set60 = block {
     final core::Set<core::String*>* #t62 = new col::_CompactLinkedHashSet::•<core::String*>();
-    #t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:125:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+    #t62.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:125:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
   Set<String> set60 = <String>{...spread};
                                   ^");
   } =>#t62;
@@ -445,13 +445,13 @@
                              ^"];
   core::Set<core::int*>* set70 = block {
     final core::Set<core::int*>* #t63 = new col::_CompactLinkedHashSet::•<core::int*>();
-    #t63.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type 'Null'.
+    #t63.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type 'Null'.
   Set<int> set70 = <int>{...null};
                             ^");
   } =>#t63;
   core::Set<dynamic>* set71ambiguous = block {
     final core::Set<dynamic>* #t64 = new col::_CompactLinkedHashSet::•<dynamic>();
-    #t64.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:137:8: Error: Expected ',' before this.
+    #t64.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:137:8: Error: Expected ',' before this.
     ...null,
        ^");
     {
@@ -460,7 +460,7 @@
         final dynamic #t65 = :sync-for-iterator.{core::Iterator::current};
         {
           final dynamic #t66 = #t65 as{TypeError} dynamic;
-          #t64.{core::Set::add}(#t66);
+          #t64.{core::Set::add}{Invariant}(#t66);
         }
       }
     }
@@ -475,7 +475,7 @@
       core::Iterator<core::int*>* :sync-for-iterator = #t68.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t69 = :sync-for-iterator.{core::Iterator::current};
-        #t67.{core::List::add}(#t69);
+        #t67.{core::List::add}{Invariant}(#t69);
       }
     }
   } =>#t67;
@@ -486,7 +486,7 @@
       core::Iterator<core::int*>* :sync-for-iterator = #t71.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::int* #t72 = :sync-for-iterator.{core::Iterator::current};
-        #t70.{core::Set::add}(#t72);
+        #t70.{core::Set::add}{Invariant}(#t72);
       }
     }
   } =>#t70;
@@ -499,7 +499,7 @@
         final dynamic #t75 = :sync-for-iterator.{core::Iterator::current};
         {
           final dynamic #t76 = #t75 as{TypeError} dynamic;
-          #t73.{core::Set::add}(#t76);
+          #t73.{core::Set::add}{Invariant}(#t76);
         }
       }
     }
@@ -509,7 +509,7 @@
         final dynamic #t77 = :sync-for-iterator.{core::Iterator::current};
         {
           final dynamic #t78 = #t77 as{TypeError} dynamic;
-          #t73.{core::Set::add}(#t78);
+          #t73.{core::Set::add}{Invariant}(#t78);
         }
       }
     }
@@ -521,7 +521,7 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = #t80.{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::int*>* #t81 = :sync-for-iterator.{core::Iterator::current};
-        #t79.{core::Map::[]=}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
+        #t79.{core::Map::[]=}{Invariant}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
       }
     }
   } =>#t79;
@@ -531,7 +531,7 @@
       core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = self::bar<core::String*, core::int*>().{core::Map::entries}.{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         final core::MapEntry<core::String*, core::int*>* #t83 = :sync-for-iterator.{core::Iterator::current};
-        #t82.{core::Map::[]=}(#t83.{core::MapEntry::key}, #t83.{core::MapEntry::value});
+        #t82.{core::Map::[]=}{Invariant}(#t83.{core::MapEntry::key}, #t83.{core::MapEntry::value});
       }
     }
   } =>#t82;
@@ -543,7 +543,7 @@
         final dynamic #t85 = :sync-for-iterator.{core::Iterator::current};
         {
           final core::int* #t86 = #t85 as{TypeError} core::int*;
-          #t84.{core::List::add}(#t86);
+          #t84.{core::List::add}{Invariant}(#t86);
         }
       }
     }
@@ -557,7 +557,7 @@
         {
           final core::num* #t89 = #t88.{core::MapEntry::key} as{TypeError} core::num*;
           final core::int* #t90 = #t88.{core::MapEntry::value} as{TypeError} core::int*;
-          #t87.{core::Map::[]=}(#t89, #t90);
+          #t87.{core::Map::[]=}{Invariant}(#t89, #t90);
         }
       }
     }
@@ -570,7 +570,7 @@
         final dynamic #t92 = :sync-for-iterator.{core::Iterator::current};
         {
           final core::int* #t93 = #t92 as{TypeError} core::int*;
-          #t91.{core::List::add}(#t93);
+          #t91.{core::List::add}{Invariant}(#t93);
         }
       }
     }
@@ -584,7 +584,7 @@
         {
           final core::num* #t96 = #t95.{core::MapEntry::key} as{TypeError} core::num*;
           final core::int* #t97 = #t95.{core::MapEntry::value} as{TypeError} core::int*;
-          #t94.{core::Map::[]=}(#t96, #t97);
+          #t94.{core::Map::[]=}{Invariant}(#t96, #t97);
         }
       }
     }
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection.dart.weak.expect
index 3044135..dffdbc4 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection.dart.weak.expect
@@ -6,63 +6,63 @@
 static method main() → dynamic {
   final core::List<core::int*>* aList = block {
     final core::List<core::int*>* #t1 = <core::int*>[];
-    #t1.{core::List::add}(1);
+    #t1.{core::List::add}{Invariant}(1);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t1.{core::List::add}(2);
+      #t1.{core::List::add}{Invariant}(2);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t1.{core::List::add}(3);
+      #t1.{core::List::add}{Invariant}(3);
     else
-      #t1.{core::List::add}(1.{core::int::unary-}());
+      #t1.{core::List::add}{Invariant}(1.{core::int::unary-}());
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t1.{core::List::add}(4);
+        #t1.{core::List::add}{Invariant}(4);
     for (core::int* i in <core::int*>[5, 6, 7])
-      #t1.{core::List::add}(i);
+      #t1.{core::List::add}{Invariant}(i);
     for (core::int* i in <core::int*>[8, 9, 10])
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t1.{core::List::add}(i);
+        #t1.{core::List::add}{Invariant}(i);
     for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
-      #t1.{core::List::add}(i);
+      #t1.{core::List::add}{Invariant}(i);
   } =>#t1;
   final core::Set<core::int*>* aSet = block {
     final core::Set<core::int*>* #t2 = col::LinkedHashSet::•<core::int*>();
-    #t2.{core::Set::add}(1);
+    #t2.{core::Set::add}{Invariant}(1);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t2.{core::Set::add}(2);
+      #t2.{core::Set::add}{Invariant}(2);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t2.{core::Set::add}(3);
+      #t2.{core::Set::add}{Invariant}(3);
     else
-      #t2.{core::Set::add}(1.{core::int::unary-}());
+      #t2.{core::Set::add}{Invariant}(1.{core::int::unary-}());
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t2.{core::Set::add}(4);
+        #t2.{core::Set::add}{Invariant}(4);
     for (core::int* i in <core::int*>[5, 6, 7])
-      #t2.{core::Set::add}(i);
+      #t2.{core::Set::add}{Invariant}(i);
     for (core::int* i in <core::int*>[8, 9, 10])
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t2.{core::Set::add}(i);
+        #t2.{core::Set::add}{Invariant}(i);
     for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
-      #t2.{core::Set::add}(i);
+      #t2.{core::Set::add}{Invariant}(i);
   } =>#t2;
   final core::Map<core::int*, core::int*>* aMap = block {
     final core::Map<core::int*, core::int*>* #t3 = <core::int*, core::int*>{};
-    #t3.{core::Map::[]=}(1, 1);
+    #t3.{core::Map::[]=}{Invariant}(1, 1);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t3.{core::Map::[]=}(2, 2);
+      #t3.{core::Map::[]=}{Invariant}(2, 2);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t3.{core::Map::[]=}(3, 3);
+      #t3.{core::Map::[]=}{Invariant}(3, 3);
     else
-      #t3.{core::Map::[]=}(1.{core::int::unary-}(), 1.{core::int::unary-}());
+      #t3.{core::Map::[]=}{Invariant}(1.{core::int::unary-}(), 1.{core::int::unary-}());
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t3.{core::Map::[]=}(4, 4);
+        #t3.{core::Map::[]=}{Invariant}(4, 4);
     for (core::int* i in <core::int*>[5, 6, 7])
-      #t3.{core::Map::[]=}(i, i);
+      #t3.{core::Map::[]=}{Invariant}(i, i);
     for (core::int* i in <core::int*>[8, 9, 10])
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t3.{core::Map::[]=}(i, i);
+        #t3.{core::Map::[]=}{Invariant}(i, i);
     for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
-      #t3.{core::Map::[]=}(i, i);
+      #t3.{core::Map::[]=}{Invariant}(i, i);
   } =>#t3;
   core::print(aList);
   core::print(aSet);
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection.dart.weak.transformed.expect
index fa89fde..c62af95 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection.dart.weak.transformed.expect
@@ -6,21 +6,21 @@
 static method main() → dynamic {
   final core::List<core::int*>* aList = block {
     final core::List<core::int*>* #t1 = <core::int*>[];
-    #t1.{core::List::add}(1);
+    #t1.{core::List::add}{Invariant}(1);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t1.{core::List::add}(2);
+      #t1.{core::List::add}{Invariant}(2);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t1.{core::List::add}(3);
+      #t1.{core::List::add}{Invariant}(3);
     else
-      #t1.{core::List::add}(1.{core::int::unary-}());
+      #t1.{core::List::add}{Invariant}(1.{core::int::unary-}());
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t1.{core::List::add}(4);
+        #t1.{core::List::add}{Invariant}(4);
     {
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[5, 6, 7].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
-        #t1.{core::List::add}(i);
+        #t1.{core::List::add}{Invariant}(i);
       }
     }
     {
@@ -28,29 +28,29 @@
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
         if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-          #t1.{core::List::add}(i);
+          #t1.{core::List::add}{Invariant}(i);
       }
     }
     for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
-      #t1.{core::List::add}(i);
+      #t1.{core::List::add}{Invariant}(i);
   } =>#t1;
   final core::Set<core::int*>* aSet = block {
     final core::Set<core::int*>* #t2 = new col::_CompactLinkedHashSet::•<core::int*>();
-    #t2.{core::Set::add}(1);
+    #t2.{core::Set::add}{Invariant}(1);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t2.{core::Set::add}(2);
+      #t2.{core::Set::add}{Invariant}(2);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t2.{core::Set::add}(3);
+      #t2.{core::Set::add}{Invariant}(3);
     else
-      #t2.{core::Set::add}(1.{core::int::unary-}());
+      #t2.{core::Set::add}{Invariant}(1.{core::int::unary-}());
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t2.{core::Set::add}(4);
+        #t2.{core::Set::add}{Invariant}(4);
     {
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[5, 6, 7].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
-        #t2.{core::Set::add}(i);
+        #t2.{core::Set::add}{Invariant}(i);
       }
     }
     {
@@ -58,29 +58,29 @@
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
         if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-          #t2.{core::Set::add}(i);
+          #t2.{core::Set::add}{Invariant}(i);
       }
     }
     for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
-      #t2.{core::Set::add}(i);
+      #t2.{core::Set::add}{Invariant}(i);
   } =>#t2;
   final core::Map<core::int*, core::int*>* aMap = block {
     final core::Map<core::int*, core::int*>* #t3 = <core::int*, core::int*>{};
-    #t3.{core::Map::[]=}(1, 1);
+    #t3.{core::Map::[]=}{Invariant}(1, 1);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t3.{core::Map::[]=}(2, 2);
+      #t3.{core::Map::[]=}{Invariant}(2, 2);
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-      #t3.{core::Map::[]=}(3, 3);
+      #t3.{core::Map::[]=}{Invariant}(3, 3);
     else
-      #t3.{core::Map::[]=}(1.{core::int::unary-}(), 1.{core::int::unary-}());
+      #t3.{core::Map::[]=}{Invariant}(1.{core::int::unary-}(), 1.{core::int::unary-}());
     if(self::oracle() as{TypeError,ForDynamic} core::bool*)
       if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-        #t3.{core::Map::[]=}(4, 4);
+        #t3.{core::Map::[]=}{Invariant}(4, 4);
     {
       core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[5, 6, 7].{core::Iterable::iterator};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
-        #t3.{core::Map::[]=}(i, i);
+        #t3.{core::Map::[]=}{Invariant}(i, i);
       }
     }
     {
@@ -88,11 +88,11 @@
       for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
         core::int* i = :sync-for-iterator.{core::Iterator::current};
         if(self::oracle() as{TypeError,ForDynamic} core::bool*)
-          #t3.{core::Map::[]=}(i, i);
+          #t3.{core::Map::[]=}{Invariant}(i, i);
       }
     }
     for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
-      #t3.{core::Map::[]=}(i, i);
+      #t3.{core::Map::[]=}{Invariant}(i, i);
   } =>#t3;
   core::print(aList);
   core::print(aSet);
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart.weak.expect
index a8cfc9f..9301e7e 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart.weak.expect
@@ -454,195 +454,195 @@
   core::List<core::int*>* list10 = block {
     final core::List<core::int*>* #t1 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t1.{core::List::add}(42);
+      #t1.{core::List::add}{Invariant}(42);
   } =>#t1;
   core::Set<core::int*>* set10 = block {
     final core::Set<core::int*>* #t2 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t2.{core::Set::add}(42);
-    #t2.{core::Set::add}(null);
+      #t2.{core::Set::add}{Invariant}(42);
+    #t2.{core::Set::add}{Invariant}(null);
   } =>#t2;
   core::Map<core::String*, core::int*>* map10 = block {
     final core::Map<core::String*, core::int*>* #t3 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t3.{core::Map::[]=}("bar", 42);
-    #t3.{core::Map::[]=}("baz", null);
+      #t3.{core::Map::[]=}{Invariant}("bar", 42);
+    #t3.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t3;
   core::List<dynamic>* list11 = block {
     final core::List<dynamic>* #t4 = <dynamic>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t4.{core::List::add}(dynVar);
+      #t4.{core::List::add}{Invariant}(dynVar);
   } =>#t4;
   core::Set<dynamic>* set11 = block {
     final core::Set<dynamic>* #t5 = col::LinkedHashSet::•<dynamic>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t5.{core::Set::add}(dynVar);
-    #t5.{core::Set::add}(null);
+      #t5.{core::Set::add}{Invariant}(dynVar);
+    #t5.{core::Set::add}{Invariant}(null);
   } =>#t5;
   core::Map<core::String*, dynamic>* map11 = block {
     final core::Map<core::String*, dynamic>* #t6 = <core::String*, dynamic>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t6.{core::Map::[]=}("bar", dynVar);
-    #t6.{core::Map::[]=}("baz", null);
+      #t6.{core::Map::[]=}{Invariant}("bar", dynVar);
+    #t6.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t6;
   core::List<core::List<core::int*>*>* list12 = block {
     final core::List<core::List<core::int*>*>* #t7 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t7.{core::List::add}(<core::int*>[42]);
+      #t7.{core::List::add}{Invariant}(<core::int*>[42]);
   } =>#t7;
   core::Set<core::List<core::int*>*>* set12 = block {
     final core::Set<core::List<core::int*>*>* #t8 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t8.{core::Set::add}(<core::int*>[42]);
-    #t8.{core::Set::add}(null);
+      #t8.{core::Set::add}{Invariant}(<core::int*>[42]);
+    #t8.{core::Set::add}{Invariant}(null);
   } =>#t8;
   core::Map<core::String*, core::List<core::int*>*>* map12 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t9 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t9.{core::Map::[]=}("bar", <core::int*>[42]);
-    #t9.{core::Map::[]=}("baz", null);
+      #t9.{core::Map::[]=}{Invariant}("bar", <core::int*>[42]);
+    #t9.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t9;
   core::List<core::int*>* list20 = block {
     final core::List<core::int*>* #t10 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::int* #t11 in <core::int*>[42])
-        #t10.{core::List::add}(#t11);
+        #t10.{core::List::add}{Invariant}(#t11);
   } =>#t10;
   core::Set<core::int*>* set20 = block {
     final core::Set<core::int*>* #t12 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::int* #t13 in <core::int*>[42])
-        #t12.{core::Set::add}(#t13);
-    #t12.{core::Set::add}(null);
+        #t12.{core::Set::add}{Invariant}(#t13);
+    #t12.{core::Set::add}{Invariant}(null);
   } =>#t12;
   core::Map<core::String*, core::int*>* map20 = block {
     final core::Map<core::String*, core::int*>* #t14 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, core::int*>* #t15 in <core::String*, core::int*>{"bar": 42}.{core::Map::entries})
-        #t14.{core::Map::[]=}(#t15.{core::MapEntry::key}, #t15.{core::MapEntry::value});
-    #t14.{core::Map::[]=}("baz", null);
+        #t14.{core::Map::[]=}{Invariant}(#t15.{core::MapEntry::key}, #t15.{core::MapEntry::value});
+    #t14.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t14;
   core::List<dynamic>* list21 = block {
     final core::List<dynamic>* #t16 = <dynamic>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final dynamic #t17 in <dynamic>[dynVar])
-        #t16.{core::List::add}(#t17);
+        #t16.{core::List::add}{Invariant}(#t17);
   } =>#t16;
   core::Set<dynamic>* set21 = block {
     final core::Set<dynamic>* #t18 = col::LinkedHashSet::•<dynamic>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final dynamic #t19 in <dynamic>[dynVar])
-        #t18.{core::Set::add}(#t19);
-    #t18.{core::Set::add}(null);
+        #t18.{core::Set::add}{Invariant}(#t19);
+    #t18.{core::Set::add}{Invariant}(null);
   } =>#t18;
   core::Map<core::String*, dynamic>* map21 = block {
     final core::Map<core::String*, dynamic>* #t20 = <core::String*, dynamic>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, dynamic>* #t21 in <core::String*, dynamic>{"bar": dynVar}.{core::Map::entries})
-        #t20.{core::Map::[]=}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
-    #t20.{core::Map::[]=}("baz", null);
+        #t20.{core::Map::[]=}{Invariant}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
+    #t20.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t20;
   core::List<core::List<core::int*>*>* list22 = block {
     final core::List<core::List<core::int*>*>* #t22 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t23 in <core::List<core::int*>*>[<core::int*>[42]])
-        #t22.{core::List::add}(#t23);
+        #t22.{core::List::add}{Invariant}(#t23);
   } =>#t22;
   core::Set<core::List<core::int*>*>* set22 = block {
     final core::Set<core::List<core::int*>*>* #t24 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t25 in <core::List<core::int*>*>[<core::int*>[42]])
-        #t24.{core::Set::add}(#t25);
-    #t24.{core::Set::add}(null);
+        #t24.{core::Set::add}{Invariant}(#t25);
+    #t24.{core::Set::add}{Invariant}(null);
   } =>#t24;
   core::Map<core::String*, core::List<core::int*>*>* map22 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t26 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t27 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[42]}.{core::Map::entries})
-        #t26.{core::Map::[]=}(#t27.{core::MapEntry::key}, #t27.{core::MapEntry::value});
-    #t26.{core::Map::[]=}("baz", null);
+        #t26.{core::Map::[]=}{Invariant}(#t27.{core::MapEntry::key}, #t27.{core::MapEntry::value});
+    #t26.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t26;
   core::List<core::int*>* list30 = block {
     final core::List<core::int*>* #t28 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t29 in <core::int*>[42])
-          #t28.{core::List::add}(#t29);
+          #t28.{core::List::add}{Invariant}(#t29);
   } =>#t28;
   core::Set<core::int*>* set30 = block {
     final core::Set<core::int*>* #t30 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t31 in <core::int*>[42])
-          #t30.{core::Set::add}(#t31);
-    #t30.{core::Set::add}(null);
+          #t30.{core::Set::add}{Invariant}(#t31);
+    #t30.{core::Set::add}{Invariant}(null);
   } =>#t30;
   core::Map<core::String*, core::int*>* map30 = block {
     final core::Map<core::String*, core::int*>* #t32 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::int*>* #t33 in <core::String*, core::int*>{"bar": 42}.{core::Map::entries})
-          #t32.{core::Map::[]=}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
-    #t32.{core::Map::[]=}("baz", null);
+          #t32.{core::Map::[]=}{Invariant}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
+    #t32.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t32;
   core::List<dynamic>* list31 = block {
     final core::List<dynamic>* #t34 = <dynamic>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final dynamic #t35 in <dynamic>[dynVar])
-          #t34.{core::List::add}(#t35);
+          #t34.{core::List::add}{Invariant}(#t35);
   } =>#t34;
   core::Set<dynamic>* set31 = block {
     final core::Set<dynamic>* #t36 = col::LinkedHashSet::•<dynamic>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final dynamic #t37 in <dynamic>[dynVar])
-          #t36.{core::Set::add}(#t37);
-    #t36.{core::Set::add}(null);
+          #t36.{core::Set::add}{Invariant}(#t37);
+    #t36.{core::Set::add}{Invariant}(null);
   } =>#t36;
   core::Map<core::String*, dynamic>* map31 = block {
     final core::Map<core::String*, dynamic>* #t38 = <core::String*, dynamic>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, dynamic>* #t39 in <core::String*, dynamic>{"bar": dynVar}.{core::Map::entries})
-          #t38.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
-    #t38.{core::Map::[]=}("baz", null);
+          #t38.{core::Map::[]=}{Invariant}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+    #t38.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t38;
   core::List<core::List<core::int*>*>* list33 = block {
     final core::List<core::List<core::int*>*>* #t40 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t41 in <core::List<core::int*>*>[<core::int*>[42]])
-          #t40.{core::List::add}(#t41);
+          #t40.{core::List::add}{Invariant}(#t41);
   } =>#t40;
   core::Set<core::List<core::int*>*>* set33 = block {
     final core::Set<core::List<core::int*>*>* #t42 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t43 in <core::List<core::int*>*>[<core::int*>[42]])
-          #t42.{core::Set::add}(#t43);
-    #t42.{core::Set::add}(null);
+          #t42.{core::Set::add}{Invariant}(#t43);
+    #t42.{core::Set::add}{Invariant}(null);
   } =>#t42;
   core::Map<core::String*, core::List<core::int*>*>* map33 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t44 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t45 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[42]}.{core::Map::entries})
-          #t44.{core::Map::[]=}(#t45.{core::MapEntry::key}, #t45.{core::MapEntry::value});
-    #t44.{core::Map::[]=}("baz", null);
+          #t44.{core::Map::[]=}{Invariant}(#t45.{core::MapEntry::key}, #t45.{core::MapEntry::value});
+    #t44.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t44;
   core::List<core::List<core::int*>*>* list40 = block {
     final core::List<core::List<core::int*>*>* #t46 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t47 in <core::List<core::int*>*>[<core::int*>[]])
-        #t46.{core::List::add}(#t47);
+        #t46.{core::List::add}{Invariant}(#t47);
   } =>#t46;
   core::Set<core::List<core::int*>*>* set40 = block {
     final core::Set<core::List<core::int*>*>* #t48 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t49 in <core::List<core::int*>*>[<core::int*>[]])
-        #t48.{core::Set::add}(#t49);
-    #t48.{core::Set::add}(null);
+        #t48.{core::Set::add}{Invariant}(#t49);
+    #t48.{core::Set::add}{Invariant}(null);
   } =>#t48;
   core::Map<core::String*, core::List<core::int*>*>* map40 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:41:34: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
   Map<String, List<int>> map40 = {if (oracle(\"foo\")) ...{\"bar\", []}, \"baz\": null};
@@ -652,62 +652,62 @@
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t51 in block {
         final core::Set<core::List<core::int*>*>* #t52 = col::LinkedHashSet::•<core::List<core::int*>*>();
-        #t52.{core::Set::add}(<core::int*>[]);
+        #t52.{core::Set::add}{Invariant}(<core::int*>[]);
       } =>#t52)
-        #t50.{core::List::add}(#t51);
+        #t50.{core::List::add}{Invariant}(#t51);
   } =>#t50;
   core::Set<core::List<core::int*>*>* set41 = block {
     final core::Set<core::List<core::int*>*>* #t53 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t54 in block {
         final core::Set<core::List<core::int*>*>* #t55 = col::LinkedHashSet::•<core::List<core::int*>*>();
-        #t55.{core::Set::add}(<core::int*>[]);
+        #t55.{core::Set::add}{Invariant}(<core::int*>[]);
       } =>#t55)
-        #t53.{core::Set::add}(#t54);
-    #t53.{core::Set::add}(null);
+        #t53.{core::Set::add}{Invariant}(#t54);
+    #t53.{core::Set::add}{Invariant}(null);
   } =>#t53;
   core::List<core::List<core::int*>*>* list42 = block {
     final core::List<core::List<core::int*>*>* #t56 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t57 in <core::List<core::int*>*>[<core::int*>[]])
-          #t56.{core::List::add}(#t57);
+          #t56.{core::List::add}{Invariant}(#t57);
   } =>#t56;
   core::Set<core::List<core::int*>*>* set42 = block {
     final core::Set<core::List<core::int*>*>* #t58 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t59 in <core::List<core::int*>*>[<core::int*>[]])
-          #t58.{core::Set::add}(#t59);
-    #t58.{core::Set::add}(null);
+          #t58.{core::Set::add}{Invariant}(#t59);
+    #t58.{core::Set::add}{Invariant}(null);
   } =>#t58;
   core::Map<core::String*, core::List<core::int*>*>* map42 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t60 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t61 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries})
-          #t60.{core::Map::[]=}(#t61.{core::MapEntry::key}, #t61.{core::MapEntry::value});
-    #t60.{core::Map::[]=}("baz", null);
+          #t60.{core::Map::[]=}{Invariant}(#t61.{core::MapEntry::key}, #t61.{core::MapEntry::value});
+    #t60.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t60;
   core::List<core::int*>* list50 = block {
     final core::List<core::int*>* #t62 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::int* #t63 in <core::int*>[])
-        #t62.{core::List::add}(#t63);
+        #t62.{core::List::add}{Invariant}(#t63);
   } =>#t62;
   core::Set<core::int*>* set50 = block {
     final core::Set<core::int*>* #t64 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::int* #t65 in <core::int*>[])
-        #t64.{core::Set::add}(#t65);
-    #t64.{core::Set::add}(null);
+        #t64.{core::Set::add}{Invariant}(#t65);
+    #t64.{core::Set::add}{Invariant}(null);
   } =>#t64;
   core::Map<core::String*, core::int*>* map50 = block {
     final core::Map<core::String*, core::int*>* #t66 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, core::int*>* #t67 in <core::String*, core::int*>{}.{core::Map::entries})
-        #t66.{core::Map::[]=}(#t67.{core::MapEntry::key}, #t67.{core::MapEntry::value});
-    #t66.{core::Map::[]=}("baz", null);
+        #t66.{core::Map::[]=}{Invariant}(#t67.{core::MapEntry::key}, #t67.{core::MapEntry::value});
+    #t66.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t66;
   core::List<core::int*>* list51 = block {
     final core::List<core::int*>* #t68 = <core::int*>[];
@@ -715,7 +715,7 @@
       for (final core::int* #t69 in block {
         final core::Set<core::int*>* #t70 = col::LinkedHashSet::•<core::int*>();
       } =>#t70)
-        #t68.{core::List::add}(#t69);
+        #t68.{core::List::add}{Invariant}(#t69);
   } =>#t68;
   core::Set<core::int*>* set51 = block {
     final core::Set<core::int*>* #t71 = col::LinkedHashSet::•<core::int*>();
@@ -723,231 +723,231 @@
       for (final core::int* #t72 in block {
         final core::Set<core::int*>* #t73 = col::LinkedHashSet::•<core::int*>();
       } =>#t73)
-        #t71.{core::Set::add}(#t72);
-    #t71.{core::Set::add}(null);
+        #t71.{core::Set::add}{Invariant}(#t72);
+    #t71.{core::Set::add}{Invariant}(null);
   } =>#t71;
   core::List<core::int*>* list52 = block {
     final core::List<core::int*>* #t74 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t75 in <core::int*>[])
-          #t74.{core::List::add}(#t75);
+          #t74.{core::List::add}{Invariant}(#t75);
   } =>#t74;
   core::Set<core::int*>* set52 = block {
     final core::Set<core::int*>* #t76 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t77 in <core::int*>[])
-          #t76.{core::Set::add}(#t77);
-    #t76.{core::Set::add}(null);
+          #t76.{core::Set::add}{Invariant}(#t77);
+    #t76.{core::Set::add}{Invariant}(null);
   } =>#t76;
   core::Map<core::String*, core::int*>* map52 = block {
     final core::Map<core::String*, core::int*>* #t78 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::int*>* #t79 in <core::String*, core::int*>{}.{core::Map::entries})
-          #t78.{core::Map::[]=}(#t79.{core::MapEntry::key}, #t79.{core::MapEntry::value});
-    #t78.{core::Map::[]=}("baz", null);
+          #t78.{core::Map::[]=}{Invariant}(#t79.{core::MapEntry::key}, #t79.{core::MapEntry::value});
+    #t78.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t78;
   core::List<core::List<core::int*>*>* list60 = block {
     final core::List<core::List<core::int*>*>* #t80 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t81 in <core::List<core::int*>*>[<core::int*>[]])
-        #t80.{core::List::add}(#t81);
+        #t80.{core::List::add}{Invariant}(#t81);
   } =>#t80;
   core::Set<core::List<core::int*>*>* set60 = block {
     final core::Set<core::List<core::int*>*>* #t82 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::List<core::int*>* #t83 in <core::List<core::int*>*>[<core::int*>[]])
-        #t82.{core::Set::add}(#t83);
-    #t82.{core::Set::add}(null);
+        #t82.{core::Set::add}{Invariant}(#t83);
+    #t82.{core::Set::add}{Invariant}(null);
   } =>#t82;
   core::Map<core::String*, core::List<core::int*>*>* map60 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t84 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t85 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries})
-        #t84.{core::Map::[]=}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
-    #t84.{core::Map::[]=}("baz", null);
+        #t84.{core::Map::[]=}{Invariant}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
+    #t84.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t84;
   core::List<core::List<core::int*>*>* list61 = block {
     final core::List<core::List<core::int*>*>* #t86 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t87 in <core::List<core::int*>*>[<core::int*>[]])
-          #t86.{core::List::add}(#t87);
+          #t86.{core::List::add}{Invariant}(#t87);
   } =>#t86;
   core::Set<core::List<core::int*>*>* set61 = block {
     final core::Set<core::List<core::int*>*>* #t88 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t89 in <core::List<core::int*>*>[<core::int*>[]])
-          #t88.{core::Set::add}(#t89);
-    #t88.{core::Set::add}(null);
+          #t88.{core::Set::add}{Invariant}(#t89);
+    #t88.{core::Set::add}{Invariant}(null);
   } =>#t88;
   core::Map<core::String*, core::List<core::int*>*>* map61 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t90 = <core::String*, core::List<core::int*>*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t91 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries})
-          #t90.{core::Map::[]=}(#t91.{core::MapEntry::key}, #t91.{core::MapEntry::value});
-    #t90.{core::Map::[]=}("baz", null);
+          #t90.{core::Map::[]=}{Invariant}(#t91.{core::MapEntry::key}, #t91.{core::MapEntry::value});
+    #t90.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t90;
   core::List<core::List<core::int*>*>* list70 = block {
     final core::List<core::List<core::int*>*>* #t92 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t92.{core::List::add}(<core::int*>[]);
+      #t92.{core::List::add}{Invariant}(<core::int*>[]);
   } =>#t92;
   core::Set<core::List<core::int*>*>* set70 = block {
     final core::Set<core::List<core::int*>*>* #t93 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t93.{core::Set::add}(<core::int*>[]);
-    #t93.{core::Set::add}(null);
+      #t93.{core::Set::add}{Invariant}(<core::int*>[]);
+    #t93.{core::Set::add}{Invariant}(null);
   } =>#t93;
   core::List<core::List<core::int*>*>* list71 = block {
     final core::List<core::List<core::int*>*>* #t94 = <core::List<core::int*>*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t94.{core::List::add}(<core::int*>[]);
+        #t94.{core::List::add}{Invariant}(<core::int*>[]);
   } =>#t94;
   core::Set<core::List<core::int*>*>* set71 = block {
     final core::Set<core::List<core::int*>*>* #t95 = col::LinkedHashSet::•<core::List<core::int*>*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
-        #t95.{core::Set::add}(<core::int*>[]);
-    #t95.{core::Set::add}(null);
+        #t95.{core::Set::add}{Invariant}(<core::int*>[]);
+    #t95.{core::Set::add}{Invariant}(null);
   } =>#t95;
   core::List<core::num*>* list80 = block {
     final core::List<core::num*>* #t96 = <core::num*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t96.{core::List::add}(42);
+      #t96.{core::List::add}{Invariant}(42);
     else
-      #t96.{core::List::add}(3.14);
+      #t96.{core::List::add}{Invariant}(3.14);
   } =>#t96;
   core::Set<core::num*>* set80 = block {
     final core::Set<core::num*>* #t97 = col::LinkedHashSet::•<core::num*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t97.{core::Set::add}(42);
+      #t97.{core::Set::add}{Invariant}(42);
     else
-      #t97.{core::Set::add}(3.14);
-    #t97.{core::Set::add}(null);
+      #t97.{core::Set::add}{Invariant}(3.14);
+    #t97.{core::Set::add}{Invariant}(null);
   } =>#t97;
   core::Map<core::String*, core::num*>* map80 = block {
     final core::Map<core::String*, core::num*>* #t98 = <core::String*, core::num*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t98.{core::Map::[]=}("bar", 42);
+      #t98.{core::Map::[]=}{Invariant}("bar", 42);
     else
-      #t98.{core::Map::[]=}("bar", 3.14);
-    #t98.{core::Map::[]=}("baz", null);
+      #t98.{core::Map::[]=}{Invariant}("bar", 3.14);
+    #t98.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t98;
   core::List<core::num*>* list81 = block {
     final core::List<core::num*>* #t99 = <core::num*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::num* #t100 in listInt)
-        #t99.{core::List::add}(#t100);
+        #t99.{core::List::add}{Invariant}(#t100);
     else
       for (final core::num* #t101 in listDouble)
-        #t99.{core::List::add}(#t101);
+        #t99.{core::List::add}{Invariant}(#t101);
   } =>#t99;
   core::Set<core::num*>* set81 = block {
     final core::Set<core::num*>* #t102 = col::LinkedHashSet::•<core::num*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::num* #t103 in listInt)
-        #t102.{core::Set::add}(#t103);
+        #t102.{core::Set::add}{Invariant}(#t103);
     else
       for (final core::num* #t104 in listDouble)
-        #t102.{core::Set::add}(#t104);
-    #t102.{core::Set::add}(null);
+        #t102.{core::Set::add}{Invariant}(#t104);
+    #t102.{core::Set::add}{Invariant}(null);
   } =>#t102;
   core::Map<core::String*, core::num*>* map81 = block {
     final core::Map<core::String*, core::num*>* #t105 = <core::String*, core::num*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, core::num*>* #t106 in mapToInt.{core::Map::entries})
-        #t105.{core::Map::[]=}(#t106.{core::MapEntry::key}, #t106.{core::MapEntry::value});
+        #t105.{core::Map::[]=}{Invariant}(#t106.{core::MapEntry::key}, #t106.{core::MapEntry::value});
     else
       for (final core::MapEntry<core::String*, core::num*>* #t107 in mapToDouble.{core::Map::entries})
-        #t105.{core::Map::[]=}(#t107.{core::MapEntry::key}, #t107.{core::MapEntry::value});
-    #t105.{core::Map::[]=}("baz", null);
+        #t105.{core::Map::[]=}{Invariant}(#t107.{core::MapEntry::key}, #t107.{core::MapEntry::value});
+    #t105.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t105;
   core::List<dynamic>* list82 = block {
     final core::List<dynamic>* #t108 = <dynamic>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final dynamic #t109 in listInt)
-        #t108.{core::List::add}(#t109);
+        #t108.{core::List::add}{Invariant}(#t109);
     else
       for (final dynamic #t110 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-        #t108.{core::List::add}(#t110);
+        #t108.{core::List::add}{Invariant}(#t110);
   } =>#t108;
   core::Set<dynamic>* set82 = block {
     final core::Set<dynamic>* #t111 = col::LinkedHashSet::•<dynamic>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final dynamic #t112 in listInt)
-        #t111.{core::Set::add}(#t112);
+        #t111.{core::Set::add}{Invariant}(#t112);
     else
       for (final dynamic #t113 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-        #t111.{core::Set::add}(#t113);
-    #t111.{core::Set::add}(null);
+        #t111.{core::Set::add}{Invariant}(#t113);
+    #t111.{core::Set::add}{Invariant}(null);
   } =>#t111;
   core::Set<dynamic>* map82 = block {
     final core::Set<dynamic>* #t114 = col::LinkedHashSet::•<dynamic>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t114.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:73:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t114.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:73:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   var map82 = {if (oracle(\"foo\")) ...mapToInt else ...dynVar, null};
                                      ^");
     else
       for (final dynamic #t115 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*)
-        #t114.{core::Set::add}(#t115);
-    #t114.{core::Set::add}(null);
+        #t114.{core::Set::add}{Invariant}(#t115);
+    #t114.{core::Set::add}{Invariant}(null);
   } =>#t114;
   core::List<core::num*>* list83 = block {
     final core::List<core::num*>* #t116 = <core::num*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t116.{core::List::add}(42);
+      #t116.{core::List::add}{Invariant}(42);
     else
       for (final core::num* #t117 in listDouble)
-        #t116.{core::List::add}(#t117);
+        #t116.{core::List::add}{Invariant}(#t117);
   } =>#t116;
   core::Set<core::num*>* set83 = block {
     final core::Set<core::num*>* #t118 = col::LinkedHashSet::•<core::num*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::num* #t119 in listInt)
-        #t118.{core::Set::add}(#t119);
+        #t118.{core::Set::add}{Invariant}(#t119);
     else
-      #t118.{core::Set::add}(3.14);
-    #t118.{core::Set::add}(null);
+      #t118.{core::Set::add}{Invariant}(3.14);
+    #t118.{core::Set::add}{Invariant}(null);
   } =>#t118;
   core::Map<core::String*, core::num*>* map83 = block {
     final core::Map<core::String*, core::num*>* #t120 = <core::String*, core::num*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final core::MapEntry<core::String*, core::num*>* #t121 in mapToInt.{core::Map::entries})
-        #t120.{core::Map::[]=}(#t121.{core::MapEntry::key}, #t121.{core::MapEntry::value});
+        #t120.{core::Map::[]=}{Invariant}(#t121.{core::MapEntry::key}, #t121.{core::MapEntry::value});
     else
-      #t120.{core::Map::[]=}("bar", 3.14);
-    #t120.{core::Map::[]=}("baz", null);
+      #t120.{core::Map::[]=}{Invariant}("bar", 3.14);
+    #t120.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t120;
   core::List<core::int*>* list90 = block {
     final core::List<core::int*>* #t122 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t122.{core::List::add}(dynVar as{TypeError,ForDynamic} core::int*);
+      #t122.{core::List::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*);
   } =>#t122;
   core::Set<core::int*>* set90 = block {
     final core::Set<core::int*>* #t123 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t123.{core::Set::add}(dynVar as{TypeError,ForDynamic} core::int*);
-    #t123.{core::Set::add}(null);
+      #t123.{core::Set::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*);
+    #t123.{core::Set::add}{Invariant}(null);
   } =>#t123;
   core::Map<core::String*, core::int*>* map90 = block {
     final core::Map<core::String*, core::int*>* #t124 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t124.{core::Map::[]=}("bar", dynVar as{TypeError,ForDynamic} core::int*);
-    #t124.{core::Map::[]=}("baz", null);
+      #t124.{core::Map::[]=}{Invariant}("bar", dynVar as{TypeError,ForDynamic} core::int*);
+    #t124.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t124;
   core::List<core::int*>* list91 = block {
     final core::List<core::int*>* #t125 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final dynamic #t126 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*) {
         final core::int* #t127 = #t126 as{TypeError} core::int*;
-        #t125.{core::List::add}(#t127);
+        #t125.{core::List::add}{Invariant}(#t127);
       }
   } =>#t125;
   core::Set<core::int*>* set91 = block {
@@ -955,9 +955,9 @@
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
       for (final dynamic #t129 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*) {
         final core::int* #t130 = #t129 as{TypeError} core::int*;
-        #t128.{core::Set::add}(#t130);
+        #t128.{core::Set::add}{Invariant}(#t130);
       }
-    #t128.{core::Set::add}(null);
+    #t128.{core::Set::add}{Invariant}(null);
   } =>#t128;
   core::Map<core::String*, core::int*>* map91 = block {
     final core::Map<core::String*, core::int*>* #t131 = <core::String*, core::int*>{};
@@ -965,49 +965,49 @@
       for (final core::MapEntry<dynamic, dynamic>* #t132 in (dynVar as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries}) {
         final core::String* #t133 = #t132.{core::MapEntry::key} as{TypeError} core::String*;
         final core::int* #t134 = #t132.{core::MapEntry::value} as{TypeError} core::int*;
-        #t131.{core::Map::[]=}(#t133, #t134);
+        #t131.{core::Map::[]=}{Invariant}(#t133, #t134);
       }
-    #t131.{core::Map::[]=}("baz", null);
+    #t131.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t131;
   core::List<core::int*>* list100 = block {
     final core::List<core::int*>* #t135 = <core::int*>[];
     if(dynVar as{TypeError,ForDynamic} core::bool*)
-      #t135.{core::List::add}(42);
+      #t135.{core::List::add}{Invariant}(42);
   } =>#t135;
   core::Set<core::int*>* set100 = block {
     final core::Set<core::int*>* #t136 = col::LinkedHashSet::•<core::int*>();
     if(dynVar as{TypeError,ForDynamic} core::bool*)
-      #t136.{core::Set::add}(42);
+      #t136.{core::Set::add}{Invariant}(42);
   } =>#t136;
   core::Map<core::int*, core::int*>* map100 = block {
     final core::Map<core::int*, core::int*>* #t137 = <core::int*, core::int*>{};
     if(dynVar as{TypeError,ForDynamic} core::bool*)
-      #t137.{core::Map::[]=}(42, 42);
+      #t137.{core::Map::[]=}{Invariant}(42, 42);
   } =>#t137;
 }
 static method testIfElementErrors(core::Map<core::int*, core::int*>* map) → dynamic {
   block {
     final core::List<core::int*>* #t138 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t138.{core::List::add}(let final<BottomType> #t139 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:89:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+      #t138.{core::List::add}{Invariant}(let final<BottomType> #t139 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:89:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>[if (oracle(\"foo\")) \"bar\"];
                            ^" in "bar" as{TypeError} core::int*);
   } =>#t138;
   block {
     final core::Set<core::int*>* #t140 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t140.{core::Set::add}(let final<BottomType> #t141 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:90:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+      #t140.{core::Set::add}{Invariant}(let final<BottomType> #t141 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:90:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>{if (oracle(\"foo\")) \"bar\", null};
                            ^" in "bar" as{TypeError} core::int*);
-    #t140.{core::Set::add}(null);
+    #t140.{core::Set::add}{Invariant}(null);
   } =>#t140;
   block {
     final core::Map<core::String*, core::int*>* #t142 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t142.{core::Map::[]=}("bar", let final<BottomType> #t143 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:91:43: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+      #t142.{core::Map::[]=}{Invariant}("bar", let final<BottomType> #t143 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:91:43: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <String, int>{if (oracle(\"foo\")) \"bar\": \"bar\", \"baz\": null};
                                           ^" in "bar" as{TypeError} core::int*);
-    #t142.{core::Map::[]=}("baz", null);
+    #t142.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t142;
   block {
     final core::List<core::int*>* #t144 = <core::int*>[];
@@ -1015,7 +1015,7 @@
       for (final core::int* #t145 in <core::int*>[let final<BottomType> #t146 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:92:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>[if (oracle(\"foo\")) ...[\"bar\"]];
                                ^" in "bar" as{TypeError} core::int*])
-        #t144.{core::List::add}(#t145);
+        #t144.{core::List::add}{Invariant}(#t145);
   } =>#t144;
   block {
     final core::Set<core::int*>* #t147 = col::LinkedHashSet::•<core::int*>();
@@ -1023,8 +1023,8 @@
       for (final core::int* #t148 in <core::int*>[let final<BottomType> #t149 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:93:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <int>{if (oracle(\"foo\")) ...[\"bar\"], null};
                                ^" in "bar" as{TypeError} core::int*])
-        #t147.{core::Set::add}(#t148);
-    #t147.{core::Set::add}(null);
+        #t147.{core::Set::add}{Invariant}(#t148);
+    #t147.{core::Set::add}{Invariant}(null);
   } =>#t147;
   block {
     final core::Map<core::String*, core::int*>* #t150 = <core::String*, core::int*>{};
@@ -1032,13 +1032,13 @@
       for (final core::MapEntry<core::String*, core::int*>* #t151 in <core::String*, core::int*>{"bar": let final<BottomType> #t152 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:94:47: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
   <String, int>{if (oracle(\"foo\")) ...{\"bar\": \"bar\"}, \"baz\": null};
                                               ^" in "bar" as{TypeError} core::int*}.{core::Map::entries})
-        #t150.{core::Map::[]=}(#t151.{core::MapEntry::key}, #t151.{core::MapEntry::value});
-    #t150.{core::Map::[]=}("baz", null);
+        #t150.{core::Map::[]=}{Invariant}(#t151.{core::MapEntry::key}, #t151.{core::MapEntry::value});
+    #t150.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t150;
   block {
     final core::List<core::int*>* #t153 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t153.{core::List::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:95:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t153.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:95:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[if (oracle(\"foo\")) ...map];
                               ^");
@@ -1046,11 +1046,11 @@
   block {
     final core::Set<core::int*>* #t154 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t154.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:96:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t154.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:96:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{if (oracle(\"foo\")) ...map, null};
                               ^");
-    #t154.{core::Set::add}(null);
+    #t154.{core::Set::add}{Invariant}(null);
   } =>#t154;
   <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:97:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -1062,58 +1062,58 @@
   block {
     final core::List<core::String*>* #t155 = <core::String*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t155.{core::List::add}(let final<BottomType> #t156 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:98:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t155.{core::List::add}{Invariant}(let final<BottomType> #t156 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:98:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String>[if (oracle(\"foo\")) 42 else 3.14];
                               ^" in 42 as{TypeError} core::String*);
     else
-      #t155.{core::List::add}(let final<BottomType> #t157 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:98:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+      #t155.{core::List::add}{Invariant}(let final<BottomType> #t157 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:98:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String>[if (oracle(\"foo\")) 42 else 3.14];
                                       ^" in 3.14 as{TypeError} core::String*);
   } =>#t155;
   block {
     final core::Set<core::String*>* #t158 = col::LinkedHashSet::•<core::String*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t158.{core::Set::add}(let final<BottomType> #t159 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:99:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t158.{core::Set::add}{Invariant}(let final<BottomType> #t159 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:99:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String>{if (oracle(\"foo\")) 42 else 3.14, null};
                               ^" in 42 as{TypeError} core::String*);
     else
-      #t158.{core::Set::add}(let final<BottomType> #t160 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:99:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+      #t158.{core::Set::add}{Invariant}(let final<BottomType> #t160 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:99:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String>{if (oracle(\"foo\")) 42 else 3.14, null};
                                       ^" in 3.14 as{TypeError} core::String*);
-    #t158.{core::Set::add}(null);
+    #t158.{core::Set::add}{Invariant}(null);
   } =>#t158;
   block {
     final core::Map<core::String*, core::String*>* #t161 = <core::String*, core::String*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t161.{core::Map::[]=}("bar", let final<BottomType> #t162 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:100:46: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t161.{core::Map::[]=}{Invariant}("bar", let final<BottomType> #t162 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:100:46: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   <String, String>{if (oracle(\"foo\")) \"bar\": 42 else \"baz\": 3.14, \"baz\": null};
                                              ^" in 42 as{TypeError} core::String*);
     else
-      #t161.{core::Map::[]=}("baz", let final<BottomType> #t163 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:100:61: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+      #t161.{core::Map::[]=}{Invariant}("baz", let final<BottomType> #t163 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:100:61: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
   <String, String>{if (oracle(\"foo\")) \"bar\": 42 else \"baz\": 3.14, \"baz\": null};
                                                             ^" in 3.14 as{TypeError} core::String*);
-    #t161.{core::Map::[]=}("baz", null);
+    #t161.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t161;
   block {
     final core::List<core::int*>* #t164 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t164.{core::List::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:101:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t164.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:101:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[if (oracle(\"foo\")) ...map else 42];
                               ^");
     else
-      #t164.{core::List::add}(42);
+      #t164.{core::List::add}{Invariant}(42);
   } =>#t164;
   block {
     final core::Set<core::int*>* #t165 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t165.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:102:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t165.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:102:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{if (oracle(\"foo\")) ...map else 42, null};
                               ^");
     else
-      #t165.{core::Set::add}(42);
-    #t165.{core::Set::add}(null);
+      #t165.{core::Set::add}{Invariant}(42);
+    #t165.{core::Set::add}{Invariant}(null);
   } =>#t165;
   <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:103:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -1125,9 +1125,9 @@
   block {
     final core::List<core::int*>* #t166 = <core::int*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t166.{core::List::add}(42);
+      #t166.{core::List::add}{Invariant}(42);
     else
-      #t166.{core::List::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:104:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t166.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:104:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>[if (oracle(\"foo\")) 42 else ...map];
                                       ^");
@@ -1135,13 +1135,13 @@
   block {
     final core::Set<core::int*>* #t167 = col::LinkedHashSet::•<core::int*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t167.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:105:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+      #t167.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:105:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
  - 'Map' is from 'dart:core'.
   <int>{if (oracle(\"foo\")) ...map else 42, null};
                               ^");
     else
-      #t167.{core::Set::add}(42);
-    #t167.{core::Set::add}(null);
+      #t167.{core::Set::add}{Invariant}(42);
+    #t167.{core::Set::add}{Invariant}(null);
   } =>#t167;
   <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:106:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
  - 'List' is from 'dart:core'.
@@ -1173,63 +1173,63 @@
     if(let final<BottomType> #t169 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:114:27: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
   List<int> list20 = [if (42) 42];
                           ^" in 42 as{TypeError} core::bool*)
-      #t168.{core::List::add}(42);
+      #t168.{core::List::add}{Invariant}(42);
   } =>#t168;
   core::Set<core::int*>* set20 = block {
     final core::Set<core::int*>* #t170 = col::LinkedHashSet::•<core::int*>();
     if(let final<BottomType> #t171 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:115:25: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
   Set<int> set20 = {if (42) 42};
                         ^" in 42 as{TypeError} core::bool*)
-      #t170.{core::Set::add}(42);
+      #t170.{core::Set::add}{Invariant}(42);
   } =>#t170;
   core::Map<core::int*, core::int*>* map30 = block {
     final core::Map<core::int*, core::int*>* #t172 = <core::int*, core::int*>{};
     if(let final<BottomType> #t173 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:116:30: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
   Map<int, int> map30 = {if (42) 42: 42};
                              ^" in 42 as{TypeError} core::bool*)
-      #t172.{core::Map::[]=}(42, 42);
+      #t172.{core::Map::[]=}{Invariant}(42, 42);
   } =>#t172;
   core::List<core::String*>* list40 = block {
     final core::List<core::String*>* #t174 = <core::String*>[];
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t174.{core::List::add}(let final<BottomType> #t175 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:117:53: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+      #t174.{core::List::add}{Invariant}(let final<BottomType> #t175 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:117:53: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
   List<String> list40 = <String>[if (oracle(\"foo\")) true else 42];
                                                     ^" in true as{TypeError} core::String*);
     else
-      #t174.{core::List::add}(let final<BottomType> #t176 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:117:63: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t174.{core::List::add}{Invariant}(let final<BottomType> #t176 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:117:63: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   List<String> list40 = <String>[if (oracle(\"foo\")) true else 42];
                                                               ^" in 42 as{TypeError} core::String*);
   } =>#t174;
   core::Set<core::String*>* set40 = block {
     final core::Set<core::String*>* #t177 = col::LinkedHashSet::•<core::String*>();
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t177.{core::Set::add}(let final<BottomType> #t178 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:118:51: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+      #t177.{core::Set::add}{Invariant}(let final<BottomType> #t178 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:118:51: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
   Set<String> set40 = <String>{if (oracle(\"foo\")) true else 42};
                                                   ^" in true as{TypeError} core::String*);
     else
-      #t177.{core::Set::add}(let final<BottomType> #t179 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:118:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t177.{core::Set::add}{Invariant}(let final<BottomType> #t179 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:118:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   Set<String> set40 = <String>{if (oracle(\"foo\")) true else 42};
                                                             ^" in 42 as{TypeError} core::String*);
   } =>#t177;
   core::Map<core::String*, core::int*>* map40 = block {
     final core::Map<core::String*, core::int*>* #t180 = <core::String*, core::int*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t180.{core::Map::[]=}(let final<BottomType> #t181 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:119:61: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+      #t180.{core::Map::[]=}{Invariant}(let final<BottomType> #t181 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:119:61: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
   Map<String, int> map40 = <String, int>{if (oracle(\"foo\")) true: 42 else 42: 42};
                                                             ^" in true as{TypeError} core::String*, 42);
     else
-      #t180.{core::Map::[]=}(let final<BottomType> #t182 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:119:75: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t180.{core::Map::[]=}{Invariant}(let final<BottomType> #t182 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:119:75: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   Map<String, int> map40 = <String, int>{if (oracle(\"foo\")) true: 42 else 42: 42};
                                                                           ^" in 42 as{TypeError} core::String*, 42);
   } =>#t180;
   core::Map<core::int*, core::String*>* map41 = block {
     final core::Map<core::int*, core::String*>* #t183 = <core::int*, core::String*>{};
     if(self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*)
-      #t183.{core::Map::[]=}(42, let final<BottomType> #t184 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:120:65: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+      #t183.{core::Map::[]=}{Invariant}(42, let final<BottomType> #t184 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:120:65: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
   Map<int, String> map41 = <int, String>{if (oracle(\"foo\")) 42: true else 42: 42};
                                                                 ^" in true as{TypeError} core::String*);
     else
-      #t183.{core::Map::[]=}(42, let final<BottomType> #t185 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:120:79: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+      #t183.{core::Map::[]=}{Invariant}(42, let final<BottomType> #t185 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/control_flow_collection_inference.dart:120:79: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
   Map<int, String> map41 = <int, String>{if (oracle(\"foo\")) 42: true else 42: 42};
                                                                               ^" in 42 as{TypeError} core::String*);
   } =>#t183;
@@ -1238,264 +1238,264 @@
   core::List<core::int*>* list10 = block {
     final core::List<core::int*>* #t186 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t186.{core::List::add}(42);
+      #t186.{core::List::add}{Invariant}(42);
   } =>#t186;
   core::Set<core::int*>* set10 = block {
     final core::Set<core::int*>* #t187 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t187.{core::Set::add}(42);
-    #t187.{core::Set::add}(null);
+      #t187.{core::Set::add}{Invariant}(42);
+    #t187.{core::Set::add}{Invariant}(null);
   } =>#t187;
   core::Map<core::String*, core::int*>* map10 = block {
     final core::Map<core::String*, core::int*>* #t188 = <core::String*, core::int*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t188.{core::Map::[]=}("bar", 42);
-    #t188.{core::Map::[]=}("baz", null);
+      #t188.{core::Map::[]=}{Invariant}("bar", 42);
+    #t188.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t188;
   core::List<dynamic>* list11 = block {
     final core::List<dynamic>* #t189 = <dynamic>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t189.{core::List::add}(dynVar);
+      #t189.{core::List::add}{Invariant}(dynVar);
   } =>#t189;
   core::Set<dynamic>* set11 = block {
     final core::Set<dynamic>* #t190 = col::LinkedHashSet::•<dynamic>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t190.{core::Set::add}(dynVar);
-    #t190.{core::Set::add}(null);
+      #t190.{core::Set::add}{Invariant}(dynVar);
+    #t190.{core::Set::add}{Invariant}(null);
   } =>#t190;
   core::Map<core::String*, dynamic>* map11 = block {
     final core::Map<core::String*, dynamic>* #t191 = <core::String*, dynamic>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t191.{core::Map::[]=}("bar", dynVar);
-    #t191.{core::Map::[]=}("baz", null);
+      #t191.{core::Map::[]=}{Invariant}("bar", dynVar);
+    #t191.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t191;
   core::List<core::List<core::int*>*>* list12 = block {
     final core::List<core::List<core::int*>*>* #t192 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t192.{core::List::add}(<core::int*>[42]);
+      #t192.{core::List::add}{Invariant}(<core::int*>[42]);
   } =>#t192;
   core::Set<core::List<core::int*>*>* set12 = block {
     final core::Set<core::List<core::int*>*>* #t193 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t193.{core::Set::add}(<core::int*>[42]);
-    #t193.{core::Set::add}(null);
+      #t193.{core::Set::add}{Invariant}(<core::int*>[42]);
+    #t193.{core::Set::add}{Invariant}(null);
   } =>#t193;
   core::Map<core::String*, core::List<core::int*>*>* map12 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t194 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
-      #t194.{core::Map::[]=}("bar", <core::int*>[42]);
-    #t194.{core::Map::[]=}("baz", null);
+      #t194.{core::Map::[]=}{Invariant}("bar", <core::int*>[42]);
+    #t194.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t194;
   core::List<core::int*>* list20 = block {
     final core::List<core::int*>* #t195 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::int* #t196 in <core::int*>[42])
-        #t195.{core::List::add}(#t196);
+        #t195.{core::List::add}{Invariant}(#t196);
   } =>#t195;
   core::Set<core::int*>* set20 = block {
     final core::Set<core::int*>* #t197 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::int* #t198 in <core::int*>[42])
-        #t197.{core::Set::add}(#t198);
-    #t197.{core::Set::add}(null);
+        #t197.{core::Set::add}{Invariant}(#t198);
+    #t197.{core::Set::add}{Invariant}(null);
   } =>#t197;
   core::Map<core::String*, core::int*>* map20 = block {
     final core::Map<core::String*, core::int*>* #t199 = <core::String*, core::int*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::MapEntry<core::String*, core::int*>* #t200 in <core::String*, core::int*>{"bar": 42}.{core::Map::entries})
-        #t199.{core::Map::[]=}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
-    #t199.{core::Map::[]=}("baz", null);
+        #t199.{core::Map::[]=}{Invariant}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
+    #t199.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t199;
   core::List<dynamic>* list21 = block {
     final core::List<dynamic>* #t201 = <dynamic>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final dynamic #t202 in <dynamic>[dynVar])
-        #t201.{core::List::add}(#t202);
+        #t201.{core::List::add}{Invariant}(#t202);
   } =>#t201;
   core::Set<dynamic>* set21 = block {
     final core::Set<dynamic>* #t203 = col::LinkedHashSet::•<dynamic>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final dynamic #t204 in <dynamic>[dynVar])
-        #t203.{core::Set::add}(#t204);
-    #t203.{core::Set::add}(null);
+        #t203.{core::Set::add}{Invariant}(#t204);
+    #t203.{core::Set::add}{Invariant}(null);
   } =>#t203;
   core::Map<core::String*, dynamic>* map21 = block {
     final core::Map<core::String*, dynamic>* #t205 = <core::String*, dynamic>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::MapEntry<core::String*, dynamic>* #t206 in <core::String*, dynamic>{"bar": dynVar}.{core::Map::entries})
-        #t205.{core::Map::[]=}(#t206.{core::MapEntry::key}, #t206.{core::MapEntry::value});
-    #t205.{core::Map::[]=}("baz", null);
+        #t205.{core::Map::[]=}{Invariant}(#t206.{core::MapEntry::key}, #t206.{core::MapEntry::value});
+    #t205.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t205;
   core::List<core::List<core::int*>*>* list22 = block {
     final core::List<core::List<core::int*>*>* #t207 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t208 in <core::List<core::int*>*>[<core::int*>[42]])
-        #t207.{core::List::add}(#t208);
+        #t207.{core::List::add}{Invariant}(#t208);
   } =>#t207;
   core::Set<core::List<core::int*>*>* set22 = block {
     final core::Set<core::List<core::int*>*>* #t209 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t210 in <core::List<core::int*>*>[<core::int*>[42]])
-        #t209.{core::Set::add}(#t210);
-    #t209.{core::Set::add}(null);
+        #t209.{core::Set::add}{Invariant}(#t210);
+    #t209.{core::Set::add}{Invariant}(null);
   } =>#t209;
   core::Map<core::String*, core::List<core::int*>*>* map22 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t211 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t212 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[42]}.{core::Map::entries})
-        #t211.{core::Map::[]=}(#t212.{core::MapEntry::key}, #t212.{core::MapEntry::value});
-    #t211.{core::Map::[]=}("baz", null);
+        #t211.{core::Map::[]=}{Invariant}(#t212.{core::MapEntry::key}, #t212.{core::MapEntry::value});
+    #t211.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t211;
   core::List<core::int*>* list30 = block {
     final core::List<core::int*>* #t213 = <core::int*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t214 in <core::int*>[42])
-          #t213.{core::List::add}(#t214);
+          #t213.{core::List::add}{Invariant}(#t214);
   } =>#t213;
   core::Set<core::int*>* set30 = block {
     final core::Set<core::int*>* #t215 = col::LinkedHashSet::•<core::int*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::int* #t216 in <core::int*>[42])
-          #t215.{core::Set::add}(#t216);
-    #t215.{core::Set::add}(null);
+          #t215.{core::Set::add}{Invariant}(#t216);
+    #t215.{core::Set::add}{Invariant}(null);
   } =>#t215;
   core::Map<core::String*, core::int*>* map30 = block {
     final core::Map<core::String*, core::int*>* #t217 = <core::String*, core::int*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::int*>* #t218 in <core::String*, core::int*>{"bar": 42}.{core::Map::entries})
-          #t217.{core::Map::[]=}(#t218.{core::MapEntry::key}, #t218.{core::MapEntry::value});
-    #t217.{core::Map::[]=}("baz", null);
+          #t217.{core::Map::[]=}{Invariant}(#t218.{core::MapEntry::key}, #t218.{core::MapEntry::value});
+    #t217.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t217;
   core::List<dynamic>* list31 = block {
     final core::List<dynamic>* #t219 = <dynamic>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final dynamic #t220 in <dynamic>[dynVar])
-          #t219.{core::List::add}(#t220);
+          #t219.{core::List::add}{Invariant}(#t220);
   } =>#t219;
   core::Set<dynamic>* set31 = block {
     final core::Set<dynamic>* #t221 = col::LinkedHashSet::•<dynamic>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final dynamic #t222 in <dynamic>[dynVar])
-          #t221.{core::Set::add}(#t222);
-    #t221.{core::Set::add}(null);
+          #t221.{core::Set::add}{Invariant}(#t222);
+    #t221.{core::Set::add}{Invariant}(null);
   } =>#t221;
   core::Map<core::String*, dynamic>* map31 = block {
     final core::Map<core::String*, dynamic>* #t223 = <core::String*, dynamic>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, dynamic>* #t224 in <core::String*, dynamic>{"bar": dynVar}.{core::Map::entries})
-          #t223.{core::Map::[]=}(#t224.{core::MapEntry::key}, #t224.{core::MapEntry::value});
-    #t223.{core::Map::[]=}("baz", null);
+          #t223.{core::Map::[]=}{Invariant}(#t224.{core::MapEntry::key}, #t224.{core::MapEntry::value});
+    #t223.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t223;
   core::List<core::List<core::int*>*>* list33 = block {
     final core::List<core::List<core::int*>*>* #t225 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t226 in <core::List<core::int*>*>[<core::int*>[42]])
-          #t225.{core::List::add}(#t226);
+          #t225.{core::List::add}{Invariant}(#t226);
   } =>#t225;
   core::Set<core::List<core::int*>*>* set33 = block {
     final core::Set<core::List<core::int*>*>* #t227 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t228 in <core::List<core::int*>*>[<core::int*>[42]])
-          #t227.{core::Set::add}(#t228);
-    #t227.{core::Set::add}(null);
+          #t227.{core::Set::add}{Invariant}(#t228);
+    #t227.{core::Set::add}{Invariant}(null);
   } =>#t227;
   core::Map<core::String*, core::List<core::int*>*>* map33 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t229 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t230 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[42]}.{core::Map::entries})
-          #t229.{core::Map::[]=}(#t230.{core::MapEntry::key}, #t230.{core::MapEntry::value});
-    #t229.{core::Map::[]=}("baz", null);
+          #t229.{core::Map::[]=}{Invariant}(#t230.{core::MapEntry::key}, #t230.{core::MapEntry::value});
+    #t229.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t229;
   core::List<core::List<core::int*>*>* list40 = block {
     final core::List<core::List<core::int*>*>* #t231 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t232 in <core::List<core::int*>*>[<core::int*>[]])
-        #t231.{core::List::add}(#t232);
+        #t231.{core::List::add}{Invariant}(#t232);
   } =>#t231;
   core::Set<core::List<core::int*>*>* set40 = block {
     final core::Set<core::List<core::int*>*>* #t233 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t234 in <core::List<core::int*>*>[<core::int*>[]])
-        #t233.{core::Set::add}(#t234);
-    #t233.{core::Set::add}(null);
+        #t233.{core::Set::add}{Invariant}(#t234);
+    #t233.{core::Set::add}{Invariant}(null);
   } =>#t233;
   core::Map<core::String*, core::List<core::int*>*>* map40 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t235 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t236 in <core::String*, core::List<core::int*>*>{"bar": <core::int*>[]}.{core::Map::entries})
-        #t235.{core::Map::[]=}(#t236.{core::MapEntry::key}, #t236.{core::MapEntry::value});
-    #t235.{core::Map::[]=}("baz", null);
+        #t235.{core::Map::[]=}{Invariant}(#t236.{core::MapEntry::key}, #t236.{core::MapEntry::value});
+    #t235.{core::Map::[]=}{Invariant}("baz", null);
   } =>#t235;
   core::List<core::List<core::int*>*>* list41 = block {
     final core::List<core::List<core::int*>*>* #t237 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t238 in block {
         final core::Set<core::List<core::int*>*>* #t239 = col::LinkedHashSet::•<core::List<core::int*>*>();
-        #t239.{core::Set::add}(<core::int*>[]);
+        #t239.{core::Set::add}{Invariant}(<core::int*>[]);
       } =>#t239)
-        #t237.{core::List::add}(#t238);
+        #t237.{core::List::add}{Invariant}(#t238);
   } =>#t237;
   core::Set<core::List<core::int*>*>* set41 = block {
     final core::Set<core::List<core::int*>*>* #t240 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       for (final core::List<core::int*>* #t241 in block {
         final core::Set<core::List<core::int*>*>* #t242 = col::LinkedHashSet::•<core::List<core::int*>*>();
-        #t242.{core::Set::add}(<core::int*>[]);
+        #t242.{core::Set::add}{Invariant}(<core::int*>[]);
       } =>#t242)
-        #t240.{core::Set::add}(#t241);
-    #t240.{core::Set::add}(null);
+        #t240.{core::Set::add}{Invariant}(#t241);
+    #t240.{core::Set::add}{Invariant}(null);
   } =>#t240;
   core::List<core::List<core::int*>*>* list42 = block {
     final core::List<core::List<core::int*>*>* #t243 = <core::List<core::int*>*>[];
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t244 in <core::List<core::int*>*>[<core::int*>[]])
-          #t243.{core::List::add}(#t244);
+          #t243.{core::List::add}{Invariant}(#t244);
   } =>#t243;
   core::Set<core::List<core::int*>*>* set42 = block {
     final core::Set<core::List<core::int*>*>* #t245 = col::LinkedHashSet::•<core::List<core::int*>*>();
     for (core::int* i = 0; self::oracle<core::String*>("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1))
       if(self::oracle<dynamic>() as{TypeError,ForDynamic} core::bool*)
         for (final core::List<core::int*>* #t246 in <core::List<core::int*>*>[<core::int*>[]])
-          #t245.{core::Set::add}(#t246);
-    #t245.{core::Set::add}(null);
+          #t245.{core::Set::add}{Invariant}(#t246);
+    #t245.{core::Set::add}{Invariant}(null);
   } =>#t245;
   core::Map<core::String*, core::List<core::int*>*>* map42 = block {
     final core::Map<core::String*, core::List<core::int*>*>* #t247 = <core::String*, core::List<core::int*>*>{};
     for (core::int* i = 0; self::oracle<core::String*>("foo")