Version 2.15.0-61.0.dev

Merge commit '3dd14b8a3ee9efd0e322dea3e03e275b7198910d' into 'dev'
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index dd6cdde..61f515c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -969,7 +969,7 @@
 
     FileState file = _fileTracker.getFile(path);
     RecordingErrorListener listener = RecordingErrorListener();
-    CompilationUnit unit = file.parse(listener);
+    CompilationUnit unit = file.parse(errorListener: listener);
     return ParsedUnitResultImpl(currentSession, file.path, file.uri,
         file.content, file.lineInfo, file.isPart, unit, listener.errors);
   }
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index b21980f..0032336 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -398,10 +398,21 @@
   }
 
   /// Return a new parsed unresolved [CompilationUnit].
-  CompilationUnitImpl parse([AnalysisErrorListener? errorListener]) {
+  ///
+  /// If [content] is provided, then it is parsed instead, for example because
+  /// it contains macro-generated declarations, and we want to resolve the
+  /// unit with these declarations.
+  CompilationUnitImpl parse({
+    String? content,
+    AnalysisErrorListener? errorListener,
+  }) {
+    content ??= this.content;
     errorListener ??= AnalysisErrorListener.NULL_LISTENER;
     try {
-      return _parse(errorListener);
+      return _parse(
+        content: content,
+        errorListener: errorListener,
+      );
     } catch (exception, stackTrace) {
       throw CaughtExceptionWithFiles(
         exception,
@@ -579,7 +590,10 @@
     }
   }
 
-  CompilationUnitImpl _parse(AnalysisErrorListener errorListener) {
+  CompilationUnitImpl _parse({
+    required String content,
+    required AnalysisErrorListener errorListener,
+  }) {
     CharSequenceReader reader = CharSequenceReader(content);
     Scanner scanner = Scanner(source, reader, errorListener)
       ..configureFeatures(
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
index b99b124..de1d124 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
@@ -51,7 +51,6 @@
 
 var timerLibraryAnalyzer = Stopwatch();
 var timerLibraryAnalyzerConst = Stopwatch();
-var timerLibraryAnalyzerFreshUnit = Stopwatch();
 var timerLibraryAnalyzerResolve = Stopwatch();
 var timerLibraryAnalyzerSplicer = Stopwatch();
 var timerLibraryAnalyzerVerify = Stopwatch();
@@ -106,24 +105,9 @@
   /// Compute analysis results for all units of the library.
   Map<FileState, UnitAnalysisResult> analyzeSync() {
     timerLibraryAnalyzer.start();
-    Map<FileState, CompilationUnitImpl> units = {};
-
-    // Parse all files.
-    timerLibraryAnalyzerFreshUnit.start();
-    for (FileState file in _library.libraryFiles) {
-      units[file] = _parse(file);
-    }
-    timerLibraryAnalyzerFreshUnit.stop();
-
-    // Resolve URIs in directives to corresponding sources.
-    FeatureSet featureSet = units[_library]!.featureSet;
-    units.forEach((file, unit) {
-      _validateFeatureSet(unit, featureSet);
-      _resolveUriBasedDirectives(file, unit);
-    });
 
     timerLibraryAnalyzerResolve.start();
-    _resolveDirectives(units);
+    var units = _resolveDirectives();
 
     units.forEach((file, unit) {
       _resolveFile(file, unit);
@@ -190,7 +174,9 @@
     units.forEach((file, unit) {
       List<AnalysisError> errors = _getErrorListener(file).errors;
       errors = _filterIgnoredErrors(file, errors);
-      results[file] = UnitAnalysisResult(file, unit, errors);
+      var combinedResult = UnitAnalysisResult(file, unit, errors);
+      var writtenResult = _transformToWrittenCode(combinedResult);
+      results[file] = writtenResult;
     });
     timerLibraryAnalyzer.stop();
     return results;
@@ -508,10 +494,16 @@
   }
 
   /// Return a new parsed unresolved [CompilationUnit].
-  CompilationUnitImpl _parse(FileState file) {
+  CompilationUnitImpl _parse(
+    FileState file,
+    CompilationUnitElementImpl element,
+  ) {
     AnalysisErrorListener errorListener = _getErrorListener(file);
-    String content = file.content;
-    var unit = file.parse(errorListener);
+    String content = element.macroGeneratedContent ?? file.content;
+    var unit = file.parse(
+      content: content,
+      errorListener: errorListener,
+    );
 
     LineInfo lineInfo = unit.lineInfo!;
     _fileToLineInfo[file] = lineInfo;
@@ -520,9 +512,17 @@
     return unit;
   }
 
-  void _resolveDirectives(Map<FileState, CompilationUnitImpl> units) {
-    var definingCompilationUnit = units[_library]!;
-    definingCompilationUnit.element = _libraryElement.definingCompilationUnit;
+  Map<FileState, CompilationUnitImpl> _resolveDirectives() {
+    var units = <FileState, CompilationUnitImpl>{};
+
+    var definingElement = _libraryElement.definingCompilationUnit;
+    definingElement as CompilationUnitElementImpl;
+
+    var definingUnit = _parse(_library, definingElement);
+    units[_library] = definingUnit;
+
+    definingUnit.element = definingElement;
+    _resolveUriBasedDirectives(_library, definingUnit);
 
     bool matchNodeElement(Directive node, Element element) {
       return node.keyword.offset == element.nameOffset;
@@ -535,7 +535,7 @@
     var directivesToResolve = <DirectiveImpl>[];
     int partDirectiveIndex = 0;
     int partElementIndex = 0;
-    for (Directive directive in definingCompilationUnit.directives) {
+    for (Directive directive in definingUnit.directives) {
       if (directive is LibraryDirectiveImpl) {
         libraryNameNode = directive.name;
         directivesToResolve.add(directive);
@@ -578,10 +578,15 @@
           continue;
         }
 
-        var partUnit = units[partFile]!;
         var partElement = _libraryElement.parts[partElementIndex++];
+        partElement as CompilationUnitElementImpl;
+
+        var partUnit = _parse(partFile, partElement);
+        units[partFile] = partUnit;
+
         partUnit.element = partElement;
         directive.element = partElement;
+        _resolveUriBasedDirectives(partFile, partUnit);
 
         Source? partSource = directive.uriSource;
         if (partSource == null) {
@@ -647,6 +652,7 @@
     }
 
     // TODO(scheglov) remove DirectiveResolver class
+    return units;
   }
 
   void _resolveFile(FileState file, CompilationUnit unit) {
@@ -765,13 +771,74 @@
     return directive.uri.stringValue ?? '';
   }
 
-  /// Validate that the feature set associated with the compilation [unit] is
-  /// the same as the [expectedSet] of features supported by the library.
-  void _validateFeatureSet(CompilationUnit unit, FeatureSet expectedSet) {
-    FeatureSet actualSet = unit.featureSet;
-    if (actualSet != expectedSet) {
-      // TODO(brianwilkerson) Generate a diagnostic.
+  /// The [combined] result was resolved, potentially with macro-generated
+  /// declarations. But the result (at least the version that corresponds to
+  /// the original, user-written file) should not include these declarations.
+  /// So, we remove these nodes, and correspondingly patch the token sequence.
+  ///
+  /// Similarly, we transform any reported diagnostics.
+  UnitAnalysisResult _transformToWrittenCode(UnitAnalysisResult combined) {
+    var unit = combined.unit;
+    var unitElement = unit.declaredElement as CompilationUnitElementImpl;
+
+    var macroGenerationDataList = unitElement.macroGenerationDataList;
+    if (macroGenerationDataList == null) {
+      return combined;
     }
+
+    for (var macroData in macroGenerationDataList.reversed) {
+      var classIndex = macroData.classDeclarationIndex;
+      if (classIndex != null) {
+        var classDeclaration = unit.declarations
+            .whereType<ClassDeclaration>()
+            .toList()[classIndex];
+        // A macro-generated declaration is always the last one.
+        var removed = classDeclaration.members.removeAt(
+          classDeclaration.members.length - 1,
+        );
+        // Patch the token sequence.
+        var followToken = removed.endToken.next!;
+        removed.beginToken.previous!.next = followToken;
+        // Shift the following tokens.
+        for (var t = followToken; t != unit.endToken; t = t.next!) {
+          t.offset -= macroData.insertLength;
+        }
+      } else {
+        // TODO(scheglov) implement top-level
+        throw UnimplementedError();
+      }
+    }
+
+    var errors = <AnalysisError>[];
+    for (var combinedError in combined.errors) {
+      var offset = combinedError.offset;
+      var isInWritten = true;
+      for (var macroData in macroGenerationDataList.reversed) {
+        if (offset > macroData.insertOffset) {
+          if (offset < macroData.insertOffset + macroData.insertLength) {
+            isInWritten = false;
+            break;
+          } else {
+            offset -= macroData.insertLength;
+          }
+        }
+      }
+      if (isInWritten) {
+        errors.add(
+          AnalysisError.forValues(
+            combinedError.source,
+            offset,
+            combinedError.length,
+            combinedError.errorCode,
+            combinedError.message,
+            combinedError.correction,
+            contextMessages: combinedError.contextMessages,
+          ),
+        );
+      }
+    }
+
+    return UnitAnalysisResult(combined.file, unit, errors);
   }
 
   /// Check the given [directive] to see if the referenced source exists and
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index d576487..ec1e0ed 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -4257,7 +4257,15 @@
   /// The offset in [CompilationUnitElementImpl.macroGeneratedContent],
   /// where the [code] is located. This offset depends on the informative
   /// data, as any other offset.
-  int offset = 0;
+  late int codeOffset;
+
+  /// Similar to [codeOffset], but the offset of the prefix before [code].
+  late int insertOffset;
+
+  /// The length of the string inserted at [insertOffset]. This string
+  /// consists of the [code] itself, with leading and trailing whitespaces
+  /// and newlines for better formatting.
+  late int insertLength;
 
   MacroGenerationData({
     required this.id,
diff --git a/pkg/analyzer/lib/src/macro/impl/macro.dart b/pkg/analyzer/lib/src/macro/impl/macro.dart
index 5974840..32c6358 100644
--- a/pkg/analyzer/lib/src/macro/impl/macro.dart
+++ b/pkg/analyzer/lib/src/macro/impl/macro.dart
@@ -130,10 +130,13 @@
             declaration.data.code +
             classMemberCodeSuffix;
         var insertOffset = shift + targetClass.rightBracket.offset;
-        declaration.data.offset = insertOffset + classMemberCodePrefix.length;
+        declaration.data.insertOffset = insertOffset;
+        declaration.data.codeOffset =
+            insertOffset + classMemberCodePrefix.length;
         generatedContent = generatedContent.substring(0, insertOffset) +
             code +
             generatedContent.substring(insertOffset);
+        declaration.data.insertLength = code.length;
         shift += code.length;
       } else {
         throw UnimplementedError();
@@ -143,7 +146,7 @@
       if (node is ast.Declaration) {
         var element = node.declaredElement as ElementImpl;
         element.accept(
-          _ShiftOffsetsElementVisitor(declaration.data.offset),
+          _ShiftOffsetsElementVisitor(declaration.data.codeOffset),
         );
         if (element is HasMacroGenerationData) {
           (element as HasMacroGenerationData).macro = declaration.data;
diff --git a/pkg/analyzer/lib/src/summary2/bundle_reader.dart b/pkg/analyzer/lib/src/summary2/bundle_reader.dart
index c6ae30c..bdfc35d 100644
--- a/pkg/analyzer/lib/src/summary2/bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary2/bundle_reader.dart
@@ -858,7 +858,7 @@
       hasMacro.macro = data;
       InformativeDataApplier(
         _elementFactory,
-        baseOffset: data.offset,
+        baseOffset: data.codeOffset,
       ).applyToDeclaration(
         element,
         data.informative,
diff --git a/pkg/analyzer/lib/src/summary2/informative_data.dart b/pkg/analyzer/lib/src/summary2/informative_data.dart
index 0136b19..23218d0 100644
--- a/pkg/analyzer/lib/src/summary2/informative_data.dart
+++ b/pkg/analyzer/lib/src/summary2/informative_data.dart
@@ -679,10 +679,12 @@
           var targetClass = unitInfo.classDeclarations[classIndex];
           var code = classMemberCodePrefix + data.code + classMemberCodeSuffix;
           var insertOffset = shift + targetClass.rightBracketOffset;
-          data.offset = insertOffset + classMemberCodePrefix.length;
+          data.insertOffset = insertOffset;
+          data.codeOffset = insertOffset + classMemberCodePrefix.length;
           generatedContent = generatedContent.substring(0, insertOffset) +
               code +
               generatedContent.substring(insertOffset);
+          data.insertLength = code.length;
           shift += code.length;
         } else {
           throw UnimplementedError();
diff --git a/pkg/analyzer/test/src/dart/resolution/macro_test.dart b/pkg/analyzer/test/src/dart/resolution/macro_test.dart
index 4dd8ebc..b309301 100644
--- a/pkg/analyzer/test/src/dart/resolution/macro_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/macro_test.dart
@@ -2,7 +2,13 @@
 // 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.
 
+import 'package:analyzer/dart/analysis/utilities.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/error/codes.dart';
+import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../../generated/elements_types_mixin.dart';
@@ -23,11 +29,35 @@
 
     newFile('$testPackageLibPath/macro_annotations.dart', content: r'''
 library analyzer.macro.annotations;
+const autoConstructor = 0;
 const observable = 0;
 ''');
   }
 
-  test_observable() async {
+  test_autoConstructor() async {
+    var code = r'''
+import 'macro_annotations.dart';
+
+@autoConstructor
+class A {
+  final int a;
+}
+
+void f() {
+  A(a: 0);
+}
+''';
+
+    // No diagnostics, specifically:
+    // 1. The constructor `A()` is declared.
+    // 2. The final field `a` is not marked, because the macro-generated
+    //    constructor does initialize it.
+    await assertNoErrorsInCode(code);
+
+    _assertResolvedUnitWithParsed(code);
+  }
+
+  test_errors_parse_shiftToWritten() async {
     await assertErrorsInCode(r'''
 import 'macro_annotations.dart';
 
@@ -36,12 +66,124 @@
   int _foo = 0;
 }
 
+int a = 0
+''', [
+      error(ParserErrorCode.EXPECTED_TOKEN, 85, 1),
+    ]);
+  }
+
+  test_errors_resolution_removeInGenerated() async {
+    // The generated `set foo(int x) { _foo = x; }` has an error, it attempts
+    // to assign to a final field `_foo`. But this error does not exist in
+    // the written code, so it is not present.
+    await assertNoErrorsInCode(r'''
+import 'macro_annotations.dart';
+
+class A {
+  @observable
+  final int _foo = 0;
+}
+''');
+  }
+
+  test_errors_resolution_shiftToWritten() async {
+    await assertErrorsInCode(r'''
+import 'macro_annotations.dart';
+
+class A {
+  @observable
+  int _foo = 0;
+}
+
+notInt a = 0;
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_CLASS, 77, 6),
+    ]);
+  }
+
+  test_observable() async {
+    var code = r'''
+import 'macro_annotations.dart';
+
+class A {
+  @observable
+  int _foo = 0;
+}
+
 void f(A a) {
   a.foo;
   a.foo = 2;
 }
-''', [
-      error(HintCode.UNUSED_FIELD, 64, 4),
-    ]);
+''';
+
+    // No diagnostics, such as unused `_foo`.
+    // We generate a getter/setter pair, so it is used.
+    await assertNoErrorsInCode(code);
+
+    _assertResolvedUnitWithParsed(code);
+  }
+
+  void _assertResolvedUnitWithParsed(String code) {
+    // The resolved content is the original code.
+    expect(result.content, code);
+
+    var resolvedUnit = result.unit;
+    var parsedUnit = parseString(content: code).unit;
+
+    // The token stream was patched to keep only tokens that existed in the
+    // original code.
+    _assertEqualTokens(resolvedUnit, parsedUnit);
+
+    // The AST was patched to keep only nodes that existed in the
+    // original code.
+    var resolvedTokenString = _nodeTokenString(resolvedUnit);
+    var parsedTokenString = _nodeTokenString(parsedUnit);
+    expect(resolvedTokenString, parsedTokenString);
+  }
+
+  static void _assertEqualTokens(AstNode first, AstNode second) {
+    var firstToken = first.beginToken;
+    var secondToken = second.beginToken;
+    while (true) {
+      if (firstToken == first.endToken && secondToken == second.endToken) {
+        break;
+      }
+      expect(firstToken.lexeme, secondToken.lexeme);
+      expect(firstToken.offset, secondToken.offset);
+      firstToken = firstToken.next!;
+      secondToken = secondToken.next!;
+    }
+  }
+
+  /// Return the string dump of all tokens in [node] and its children.
+  static String _nodeTokenString(AstNode node) {
+    var tokens = <Token>[];
+    node.accept(
+      _RecursiveTokenCollector(tokens),
+    );
+
+    // `AstNode.childEntities` does not return tokens in any specific order.
+    // So, we sort them to make the sequence look reasonable.
+    tokens.sort((a, b) => a.offset - b.offset);
+
+    var buffer = StringBuffer();
+    for (var token in tokens) {
+      buffer.writeln('${token.lexeme} @${token.offset}');
+    }
+    return buffer.toString();
+  }
+}
+
+class _RecursiveTokenCollector extends GeneralizingAstVisitor<void> {
+  final List<Token> _tokens;
+
+  _RecursiveTokenCollector(this._tokens);
+
+  @override
+  void visitNode(AstNode node) {
+    _tokens.addAll(
+      node.childEntities.whereType<Token>(),
+    );
+    super.visitNode(node);
   }
 }
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 c18ba24..8ab26bf 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -558,6 +558,14 @@
 
   Statement popStatement() => forest.wrapVariables(pop() as Statement);
 
+  Statement? popNullableStatement() {
+    Statement? statement = pop(NullValue.Block) as Statement?;
+    if (statement != null) {
+      statement = forest.wrapVariables(statement);
+    }
+    return statement;
+  }
+
   void enterSwitchScope() {
     push(switchScope ?? NullValue.SwitchScope);
     switchScope = scope;
@@ -5388,9 +5396,19 @@
     // This is matched by the call to [endNode] in [pushNamedFunction] or
     // [endFunctionExpression].
     typeInferrer.assignedVariables.beginNode();
+    assert(checkState(null, [
+      /* inCatchBlock */ ValueKinds.Bool,
+      /* switch scope */ ValueKinds.SwitchScopeOrNull,
+    ]));
   }
 
   void exitFunction() {
+    assert(checkState(null, [
+      /* inCatchBlock */ ValueKinds.Bool,
+      /* switch scope */ ValueKinds.SwitchScopeOrNull,
+      /* function type variables */ ValueKinds.TypeVariableListOrNull,
+      /* function block scope */ ValueKinds.Scope,
+    ]));
     debugEvent("exitFunction");
     functionNestingLevel--;
     inCatchBlock = pop() as bool;
@@ -5400,6 +5418,9 @@
     exitLocalScope();
     push(typeVariables ?? NullValue.TypeVariables);
     _exitLocalState();
+    assert(checkState(null, [
+      ValueKinds.TypeVariableListOrNull,
+    ]));
   }
 
   @override
@@ -5524,7 +5545,20 @@
   @override
   void endFunctionExpression(Token beginToken, Token token) {
     debugEvent("FunctionExpression");
-    Statement body = popStatement();
+    assert(checkState(beginToken, [
+      /* body */ ValueKinds.StatementOrNull,
+      /* async marker */ ValueKinds.AsyncMarker,
+      /* function type scope */ ValueKinds.Scope,
+      /* formal parameters */ ValueKinds.FormalParameters,
+      /* inCatchBlock */ ValueKinds.Bool,
+      /* switch scope */ ValueKinds.SwitchScopeOrNull,
+      /* function type variables */ ValueKinds.TypeVariableListOrNull,
+      /* function block scope */ ValueKinds.Scope,
+    ]));
+    Statement body = popNullableStatement() ??
+        // In erroneous cases, there might not be function body. In such cases
+        // we use an empty statement instead.
+        forest.createEmptyStatement(token.charOffset);
     AsyncMarker asyncModifier = pop() as AsyncMarker;
     exitLocalScope();
     FormalParameters formals = pop() as FormalParameters;
@@ -5548,6 +5582,9 @@
     // This is matched by the call to [beginNode] in [enterFunction].
     typeInferrer.assignedVariables
         .endNode(result, isClosureOrLateVariableInitializer: true);
+    assert(checkState(beginToken, [
+      /* function expression or problem */ ValueKinds.Expression,
+    ]));
   }
 
   @override
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index 8ddf28c..a386b07 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -1032,7 +1032,7 @@
     }
     assert(checkState(beginToken, [
       ValueKinds.AsyncModifier,
-      ValueKinds.FormalsOrNull,
+      ValueKinds.FormalListOrNull,
       ValueKinds.Integer, // formals offset
       ValueKinds.TypeVariableListOrNull,
       ValueKinds.Integer, // name offset
diff --git a/pkg/front_end/lib/src/fasta/source/scope_listener.dart b/pkg/front_end/lib/src/fasta/source/scope_listener.dart
index ee9b746..21c67fe 100644
--- a/pkg/front_end/lib/src/fasta/source/scope_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/scope_listener.dart
@@ -13,6 +13,7 @@
 
 import '../scope.dart' show Scope;
 import 'stack_listener_impl.dart';
+import 'value_kinds.dart';
 
 export 'package:_fe_analyzer_shared/src/parser/stack_listener.dart'
     show FixedNullableList, GrowableList, NullValue, ParserRecovery;
@@ -49,10 +50,16 @@
   void enterLocalScope(String debugName, [Scope? newScope]) {
     push(scope);
     scope = newScope ?? scope.createNestedScope(debugName);
+    assert(checkState(null, [
+      ValueKinds.Scope,
+    ]));
   }
 
   @override
   void exitLocalScope() {
+    assert(checkState(null, [
+      ValueKinds.Scope,
+    ]));
     scope = pop() as Scope;
     // ignore: unnecessary_null_comparison
     assert(scope != null);
diff --git a/pkg/front_end/lib/src/fasta/source/value_kinds.dart b/pkg/front_end/lib/src/fasta/source/value_kinds.dart
index 50543f0..3b8edb0 100644
--- a/pkg/front_end/lib/src/fasta/source/value_kinds.dart
+++ b/pkg/front_end/lib/src/fasta/source/value_kinds.dart
@@ -22,6 +22,7 @@
 
 import '../identifiers.dart' as type;
 
+import '../kernel/body_builder.dart' as type show FormalParameters;
 import '../kernel/expression_generator.dart' as type;
 
 import '../modifier.dart' as type;
@@ -36,12 +37,15 @@
 
 class ValueKinds {
   static const ValueKind AnnotationList =
-  const SingleValueKind<List<type.Expression>>();
+      const SingleValueKind<List<type.Expression>>();
   static const ValueKind AnnotationListOrNull =
       const SingleValueKind<List<type.Expression>>(NullValue.Metadata);
   static const ValueKind Arguments = const SingleValueKind<type.Arguments>();
   static const ValueKind ArgumentsOrNull =
       const SingleValueKind<type.Arguments>(NullValue.Arguments);
+  static const ValueKind AsyncMarker =
+      const SingleValueKind<type.AsyncMarker>();
+  static const ValueKind Bool = const SingleValueKind<bool>();
   static const ValueKind ConstantContext =
       const SingleValueKind<type.ConstantContext>();
   static const ValueKind Expression = const SingleValueKind<type.Expression>();
@@ -55,9 +59,11 @@
   static const ValueKind Integer = const SingleValueKind<int>();
   static const ValueKind AsyncModifier =
       const SingleValueKind<type.AsyncMarker>();
-  static const ValueKind Formals =
+  static const ValueKind FormalParameters =
+      const SingleValueKind<type.FormalParameters>();
+  static const ValueKind FormalList =
       const SingleValueKind<List<type.FormalParameterBuilder>>();
-  static const ValueKind FormalsOrNull =
+  static const ValueKind FormalListOrNull =
       const SingleValueKind<List<type.FormalParameterBuilder>>(
           NullValue.FormalParameters);
   static const ValueKind Generator = const SingleValueKind<type.Generator>();
@@ -87,6 +93,9 @@
       const SingleValueKind<type.ProblemBuilder>();
   static const ValueKind QualifiedName =
       const SingleValueKind<type.QualifiedName>();
+  static const ValueKind Scope = const SingleValueKind<type.Scope>();
+  static const ValueKind SwitchScopeOrNull =
+      const SingleValueKind<type.Scope>(NullValue.SwitchScope);
   static const ValueKind Statement = const SingleValueKind<type.Statement>();
   static const ValueKind StatementOrNull =
       const SingleValueKind<type.Statement>(NullValue.Block);
diff --git a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart
new file mode 100644
index 0000000..620e4da
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2021, 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.
+
+class Class<T> {
+  Class();
+  Class.named();
+}
+
+test() {
+  Class<int>;
+  Class<int>();
+  Class<int><int>;
+  Class<int><int>();
+  Class<int>.named;
+  Class<int>.named();
+  Class<int>.named<int>;
+  Class<int>.named<int>();
+  Class<int><int>.named;
+  Class<int><int>.named();
+  Class<int><int>.named<int>;
+  Class<int><int>.named<int>();
+  Class<int><int>.named<int><int>;
+  Class<int><int>.named<int><int>();
+}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.expect
new file mode 100644
index 0000000..9ba9e7d
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.expect
@@ -0,0 +1,321 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:18: Error: Expected '[' before this.
+//   Class<int><int>;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:20: Error: Unexpected token ';'.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:20: Error: Expected a function body or '=>'.
+// Try adding {}.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:20: Error: Expected ';' after this.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:18:14: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+//   Class<int>.named<int>();
+//              ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:18: Error: Expected '[' before this.
+//   Class<int><int>.named;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:18: Error: Expected '[' before this.
+//   Class<int><int>.named();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int>;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int>;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int>();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int>();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:24: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//                        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:28: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//                            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:34: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>;
+//                                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:24: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//                        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:28: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//                            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:36: Error: Unexpected token ';'.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:36: Error: Expected a function body or '=>'.
+// Try adding {}.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:36: Error: Expected ';' after this.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:17:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Class<int> Function()'.
+//  - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart'.
+// Try changing the operand or remove the type arguments.
+//   Class<int>.named<int>;
+//                   ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'named'.
+//   Class<int><int>.named();
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int>;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int>;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
+// Try changing the operand or remove the type arguments.
+//   Class<int><int>.named<int>;
+//                        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int>();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'named'.
+//   Class<int><int>.named<int>();
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int><int>;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int><int>;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int><int>();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int><int>();
+//                   ^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Class<T extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::Class<self::Class::T%>
+    : super core::Object::•()
+    ;
+  constructor named() → self::Class<self::Class::T%>
+    : super core::Object::•()
+    ;
+}
+static method test() → dynamic {
+  #C1;
+  new self::Class::•<core::int>();
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(<core::int>[]);
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+    ;
+);
+  #C5;
+  new self::Class::named<core::int>();
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:17:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Class<int> Function()'.
+ - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart'.
+Try changing the operand or remove the type arguments.
+  Class<int>.named<int>;
+                  ^";
+  new self::Class::named<core::int>();
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named;
+                  ^^^^^" in <core::int>[]{<unresolved>}.named);
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'named'.
+  Class<int><int>.named();
+                  ^^^^^" in <core::int>[]{<unresolved>}.named());
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int>;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
+Try changing the operand or remove the type arguments.
+  Class<int><int>.named<int>;
+                       ^");
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int>();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'named'.
+  Class<int><int>.named<int>();
+                  ^^^^^" in <core::int>[]{<unresolved>}.named<core::int>());
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int><int>;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int><int>;
+                  ^^^^^" in <core::int>[]{<unresolved>}.named){dynamic}.<(#C3){dynamic}.>(<core::int>[]);
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int><int>();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int><int>();
+                  ^^^^^" in <core::int>[]{<unresolved>}.named){dynamic}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+    ;
+);
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = TypeLiteralConstant(self::Class<core::int>)
+  #C2 = TypeLiteralConstant(self::Class<dynamic>)
+  #C3 = TypeLiteralConstant(core::int)
+  #C4 = constructor-tearoff self::Class::named
+  #C5 = instantiation self::Class::named <core::int>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.transformed.expect
new file mode 100644
index 0000000..4ca72c7
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.transformed.expect
@@ -0,0 +1,321 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:18: Error: Expected '[' before this.
+//   Class<int><int>;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:20: Error: Unexpected token ';'.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:20: Error: Expected a function body or '=>'.
+// Try adding {}.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:20: Error: Expected ';' after this.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:18:14: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+//   Class<int>.named<int>();
+//              ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:18: Error: Expected '[' before this.
+//   Class<int><int>.named;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:18: Error: Expected '[' before this.
+//   Class<int><int>.named();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int>;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int>;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int>();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int>();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:24: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//                        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:28: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//                            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:34: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>;
+//                                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:24: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//                        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:28: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//                            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:36: Error: Unexpected token ';'.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:36: Error: Expected a function body or '=>'.
+// Try adding {}.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:36: Error: Expected ';' after this.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:17:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Class<int> Function()'.
+//  - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart'.
+// Try changing the operand or remove the type arguments.
+//   Class<int>.named<int>;
+//                   ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'named'.
+//   Class<int><int>.named();
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int>;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int>;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
+// Try changing the operand or remove the type arguments.
+//   Class<int><int>.named<int>;
+//                        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int>();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'named'.
+//   Class<int><int>.named<int>();
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int><int>;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int><int>;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int><int>();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int><int>();
+//                   ^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Class<T extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::Class<self::Class::T%>
+    : super core::Object::•()
+    ;
+  constructor named() → self::Class<self::Class::T%>
+    : super core::Object::•()
+    ;
+}
+static method test() → dynamic {
+  #C1;
+  new self::Class::•<core::int>();
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(core::_GrowableList::•<core::int>(0));
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+    ;
+);
+  #C5;
+  new self::Class::named<core::int>();
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:17:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Class<int> Function()'.
+ - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart'.
+Try changing the operand or remove the type arguments.
+  Class<int>.named<int>;
+                  ^";
+  new self::Class::named<core::int>();
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named;
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named);
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'named'.
+  Class<int><int>.named();
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named());
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int>;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
+Try changing the operand or remove the type arguments.
+  Class<int><int>.named<int>;
+                       ^");
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int>();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'named'.
+  Class<int><int>.named<int>();
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named<core::int>());
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int><int>;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int><int>;
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named){dynamic}.<(#C3){dynamic}.>(core::_GrowableList::•<core::int>(0));
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int><int>();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int><int>();
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named){dynamic}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+    ;
+);
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = TypeLiteralConstant(self::Class<core::int>)
+  #C2 = TypeLiteralConstant(self::Class<dynamic>)
+  #C3 = TypeLiteralConstant(core::int)
+  #C4 = constructor-tearoff self::Class::named
+  #C5 = instantiation self::Class::named <core::int>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.textual_outline.expect
new file mode 100644
index 0000000..8a30727
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.textual_outline.expect
@@ -0,0 +1,7 @@
+class Class<T> {
+  Class();
+  Class.named();
+}
+
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..6f75818
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.textual_outline_modelled.expect
@@ -0,0 +1,7 @@
+class Class<T> {
+  Class();
+  Class.named();
+}
+
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.expect
new file mode 100644
index 0000000..3c1d2af
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.expect
@@ -0,0 +1,321 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:18: Error: Expected '[' before this.
+//   Class<int><int>;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:20: Error: Unexpected token ';'.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:20: Error: Expected a function body or '=>'.
+// Try adding {}.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:20: Error: Expected ';' after this.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:18:14: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+//   Class<int>.named<int>();
+//              ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:18: Error: Expected '[' before this.
+//   Class<int><int>.named;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:18: Error: Expected '[' before this.
+//   Class<int><int>.named();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int>;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int>;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int>();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int>();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:24: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//                        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:28: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//                            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:34: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>;
+//                                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:24: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//                        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:28: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//                            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:36: Error: Unexpected token ';'.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:36: Error: Expected a function body or '=>'.
+// Try adding {}.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:36: Error: Expected ';' after this.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:17:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Class<int> Function()'.
+//  - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart'.
+// Try changing the operand or remove the type arguments.
+//   Class<int>.named<int>;
+//                   ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'named'.
+//   Class<int><int>.named();
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int>;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int>;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
+// Try changing the operand or remove the type arguments.
+//   Class<int><int>.named<int>;
+//                        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int>();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'named'.
+//   Class<int><int>.named<int>();
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int><int>;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int><int>;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int><int>();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int><int>();
+//                   ^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Class<T extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::Class<self::Class::T%>
+    : super core::Object::•()
+    ;
+  constructor named() → self::Class<self::Class::T%>
+    : super core::Object::•()
+    ;
+}
+static method test() → dynamic {
+  #C1;
+  new self::Class::•<core::int>();
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(<core::int>[]);
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+    ;
+);
+  #C5;
+  new self::Class::named<core::int>();
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:17:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Class<int> Function()'.
+ - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart'.
+Try changing the operand or remove the type arguments.
+  Class<int>.named<int>;
+                  ^";
+  new self::Class::named<core::int>();
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named;
+                  ^^^^^" in <core::int>[]{<unresolved>}.named);
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'named'.
+  Class<int><int>.named();
+                  ^^^^^" in <core::int>[]{<unresolved>}.named());
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int>;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
+Try changing the operand or remove the type arguments.
+  Class<int><int>.named<int>;
+                       ^");
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int>();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'named'.
+  Class<int><int>.named<int>();
+                  ^^^^^" in <core::int>[]{<unresolved>}.named<core::int>());
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int><int>;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int><int>;
+                  ^^^^^" in <core::int>[]{<unresolved>}.named){dynamic}.<(#C3){dynamic}.>(<core::int>[]);
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int><int>();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int><int>();
+                  ^^^^^" in <core::int>[]{<unresolved>}.named){dynamic}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+    ;
+);
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = TypeLiteralConstant(self::Class<core::int*>*)
+  #C2 = TypeLiteralConstant(self::Class<dynamic>*)
+  #C3 = TypeLiteralConstant(core::int*)
+  #C4 = constructor-tearoff self::Class::named
+  #C5 = instantiation self::Class::named <core::int*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.outline.expect
new file mode 100644
index 0000000..9207474
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.outline.expect
@@ -0,0 +1,14 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class<T extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::Class<self::Class::T%>
+    ;
+  constructor named() → self::Class<self::Class::T%>
+    ;
+}
+static method test() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.transformed.expect
new file mode 100644
index 0000000..5cdc315
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.transformed.expect
@@ -0,0 +1,321 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:18: Error: Expected '[' before this.
+//   Class<int><int>;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:20: Error: Unexpected token ';'.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:20: Error: Expected a function body or '=>'.
+// Try adding {}.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:20: Error: Expected ';' after this.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:18:14: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+//   Class<int>.named<int>();
+//              ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:18: Error: Expected '[' before this.
+//   Class<int><int>.named;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:18: Error: Expected '[' before this.
+//   Class<int><int>.named();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int>;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int>;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int>();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int>();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>;
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:24: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//                        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:28: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//                            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:34: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>;
+//                                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:24: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//                        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:28: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//                            ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:36: Error: Unexpected token ';'.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:36: Error: Expected a function body or '=>'.
+// Try adding {}.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:36: Error: Expected ';' after this.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:17:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Class<int> Function()'.
+//  - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart'.
+// Try changing the operand or remove the type arguments.
+//   Class<int>.named<int>;
+//                   ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'named'.
+//   Class<int><int>.named();
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int>;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int>;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
+// Try changing the operand or remove the type arguments.
+//   Class<int><int>.named<int>;
+//                        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int>();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'named'.
+//   Class<int><int>.named<int>();
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int><int>;
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int><int>;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int><int>();
+//        ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int><int>();
+//                   ^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Class<T extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::Class<self::Class::T%>
+    : super core::Object::•()
+    ;
+  constructor named() → self::Class<self::Class::T%>
+    : super core::Object::•()
+    ;
+}
+static method test() → dynamic {
+  #C1;
+  new self::Class::•<core::int>();
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:13:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(core::_GrowableList::•<core::int>(0));
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+    ;
+);
+  #C5;
+  new self::Class::named<core::int>();
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:17:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Class<int> Function()'.
+ - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart'.
+Try changing the operand or remove the type arguments.
+  Class<int>.named<int>;
+                  ^";
+  new self::Class::named<core::int>();
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named;
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named);
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'named'.
+  Class<int><int>.named();
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named());
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int>;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
+Try changing the operand or remove the type arguments.
+  Class<int><int>.named<int>;
+                       ^");
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int>();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'named'.
+  Class<int><int>.named<int>();
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named<core::int>());
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int><int>;
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int><int>;
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named){dynamic}.<(#C3){dynamic}.>(core::_GrowableList::•<core::int>(0));
+  invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int><int>();
+       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int><int>();
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named){dynamic}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+    ;
+);
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = TypeLiteralConstant(self::Class<core::int*>*)
+  #C2 = TypeLiteralConstant(self::Class<dynamic>*)
+  #C3 = TypeLiteralConstant(core::int*)
+  #C4 = constructor-tearoff self::Class::named
+  #C5 = instantiation self::Class::named <core::int*>
+}
diff --git a/pkg/front_end/testcases/general/duplicate_instantiation.dart b/pkg/front_end/testcases/general/duplicate_instantiation.dart
new file mode 100644
index 0000000..620e4da
--- /dev/null
+++ b/pkg/front_end/testcases/general/duplicate_instantiation.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2021, 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.
+
+class Class<T> {
+  Class();
+  Class.named();
+}
+
+test() {
+  Class<int>;
+  Class<int>();
+  Class<int><int>;
+  Class<int><int>();
+  Class<int>.named;
+  Class<int>.named();
+  Class<int>.named<int>;
+  Class<int>.named<int>();
+  Class<int><int>.named;
+  Class<int><int>.named();
+  Class<int><int>.named<int>;
+  Class<int><int>.named<int>();
+  Class<int><int>.named<int><int>;
+  Class<int><int>.named<int><int>();
+}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/duplicate_instantiation.dart.textual_outline.expect b/pkg/front_end/testcases/general/duplicate_instantiation.dart.textual_outline.expect
new file mode 100644
index 0000000..8a30727
--- /dev/null
+++ b/pkg/front_end/testcases/general/duplicate_instantiation.dart.textual_outline.expect
@@ -0,0 +1,7 @@
+class Class<T> {
+  Class();
+  Class.named();
+}
+
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/general/duplicate_instantiation.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/duplicate_instantiation.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..6f75818
--- /dev/null
+++ b/pkg/front_end/testcases/general/duplicate_instantiation.dart.textual_outline_modelled.expect
@@ -0,0 +1,7 @@
+class Class<T> {
+  Class();
+  Class.named();
+}
+
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.expect b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.expect
new file mode 100644
index 0000000..d1b8067
--- /dev/null
+++ b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.expect
@@ -0,0 +1,346 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:11:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+//   Class<int>;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:13:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>;
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:13:18: Error: Expected '[' before this.
+//   Class<int><int>;
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:14:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>();
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:14:20: Error: Unexpected token ';'.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:14:20: Error: Expected a function body or '=>'.
+// Try adding {}.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:14:20: Error: Expected ';' after this.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:15:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+//   Class<int>.named;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:15:14: Error: Member not found: 'named'.
+//   Class<int>.named;
+//              ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:17:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+//   Class<int>.named<int>;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:17:19: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+//   Class<int>.named<int>;
+//                   ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:17:14: Error: Member not found: 'named'.
+//   Class<int>.named<int>;
+//              ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:18:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+//   Class<int>.named<int>();
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:18:14: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+//   Class<int>.named<int>();
+//              ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named;
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:18: Error: Expected '[' before this.
+//   Class<int><int>.named;
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named();
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:18: Error: Expected '[' before this.
+//   Class<int><int>.named();
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:21:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int>;
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:21:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int>;
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:21:24: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+//   Class<int><int>.named<int>;
+//                        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:22:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int>();
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:22:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int>();
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>;
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:24: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//                        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:28: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//                            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:34: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>;
+//                                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>();
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:24: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//                        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:28: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//                            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:36: Error: Unexpected token ';'.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:36: Error: Expected a function body or '=>'.
+// Try adding {}.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:36: Error: Expected ';' after this.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:13:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>();
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named();
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'named'.
+//   Class<int><int>.named();
+//                   ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:21:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int>;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:21:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int>;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:22:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int>();
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'named'.
+//   Class<int><int>.named<int>();
+//                   ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int><int>;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int><int>;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int><int>();
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int><int>();
+//                   ^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Class<T extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::Class<self::Class::T%>
+    : super core::Object::•()
+    ;
+  constructor named() → self::Class<self::Class::T%>
+    : super core::Object::•()
+    ;
+}
+static method test() → dynamic {
+  #C1;
+  new self::Class::•<core::int>();
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:13:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>;
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(<core::int>[]);
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>();
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+    ;
+);
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:15:14: Error: Member not found: 'named'.
+  Class<int>.named;
+             ^^^^^";
+  new self::Class::named<core::int>();
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:17:14: Error: Member not found: 'named'.
+  Class<int>.named<int>;
+             ^^^^^";
+  new self::Class::named<core::int>();
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:19:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named;
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named;
+                  ^^^^^" in <core::int>[]{<unresolved>}.named);
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:20:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named();
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'named'.
+  Class<int><int>.named();
+                  ^^^^^" in <core::int>[]{<unresolved>}.named());
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:21:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int>;
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:21:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int>;
+                  ^^^^^" in <core::int>[]{<unresolved>}.named);
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:22:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int>();
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'named'.
+  Class<int><int>.named<int>();
+                  ^^^^^" in <core::int>[]{<unresolved>}.named<core::int>());
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:23:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int><int>;
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int><int>;
+                  ^^^^^" in <core::int>[]{<unresolved>}.named){dynamic}.<(#C2){dynamic}.>(<core::int>[]);
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:24:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int><int>();
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int><int>();
+                  ^^^^^" in <core::int>[]{<unresolved>}.named){dynamic}.<(#C2){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+    ;
+);
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = TypeLiteralConstant(self::Class<dynamic>*)
+  #C2 = TypeLiteralConstant(core::int*)
+}
diff --git a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.outline.expect b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.outline.expect
new file mode 100644
index 0000000..9207474
--- /dev/null
+++ b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.outline.expect
@@ -0,0 +1,14 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class<T extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::Class<self::Class::T%>
+    ;
+  constructor named() → self::Class<self::Class::T%>
+    ;
+}
+static method test() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.transformed.expect
new file mode 100644
index 0000000..9058897
--- /dev/null
+++ b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.transformed.expect
@@ -0,0 +1,346 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:11:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+//   Class<int>;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:13:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>;
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:13:18: Error: Expected '[' before this.
+//   Class<int><int>;
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:14:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>();
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:14:20: Error: Unexpected token ';'.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:14:20: Error: Expected a function body or '=>'.
+// Try adding {}.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:14:20: Error: Expected ';' after this.
+//   Class<int><int>();
+//                    ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:15:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+//   Class<int>.named;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:15:14: Error: Member not found: 'named'.
+//   Class<int>.named;
+//              ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:17:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+//   Class<int>.named<int>;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:17:19: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+//   Class<int>.named<int>;
+//                   ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:17:14: Error: Member not found: 'named'.
+//   Class<int>.named<int>;
+//              ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:18:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+//   Class<int>.named<int>();
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:18:14: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+//   Class<int>.named<int>();
+//              ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named;
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:18: Error: Expected '[' before this.
+//   Class<int><int>.named;
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named();
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:18: Error: Expected '[' before this.
+//   Class<int><int>.named();
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:21:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int>;
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:21:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int>;
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:21:24: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+//   Class<int><int>.named<int>;
+//                        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:22:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int>();
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:22:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int>();
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>;
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:24: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//                        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:28: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>;
+//                            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:34: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>;
+//                                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:12: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:18: Error: Expected '[' before this.
+//   Class<int><int>.named<int><int>();
+//                  ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:24: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//                        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:28: Error: A comparison expression can't be an operand of another comparison expression.
+// Try putting parentheses around one of the comparisons.
+//   Class<int><int>.named<int><int>();
+//                            ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:36: Error: Unexpected token ';'.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:36: Error: Expected a function body or '=>'.
+// Try adding {}.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:36: Error: Expected ';' after this.
+//   Class<int><int>.named<int><int>();
+//                                    ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:13:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>();
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named();
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'named'.
+//   Class<int><int>.named();
+//                   ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:21:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int>;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:21:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int>;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:22:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int>();
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'named'.
+//   Class<int><int>.named<int>();
+//                   ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int><int>;
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int><int>;
+//                   ^^^^^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:8: Error: The operator '<' isn't defined for the class 'Type'.
+//  - 'Type' is from 'dart:core'.
+// Try correcting the operator to an existing operator, or defining a '<' operator.
+//   Class<int><int>.named<int><int>();
+//        ^
+//
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+//  - 'List' is from 'dart:core'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+//   Class<int><int>.named<int><int>();
+//                   ^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Class<T extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::Class<self::Class::T%>
+    : super core::Object::•()
+    ;
+  constructor named() → self::Class<self::Class::T%>
+    : super core::Object::•()
+    ;
+}
+static method test() → dynamic {
+  #C1;
+  new self::Class::•<core::int>();
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:13:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>;
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(core::_GrowableList::•<core::int>(0));
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>();
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+    ;
+);
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:15:14: Error: Member not found: 'named'.
+  Class<int>.named;
+             ^^^^^";
+  new self::Class::named<core::int>();
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:17:14: Error: Member not found: 'named'.
+  Class<int>.named<int>;
+             ^^^^^";
+  new self::Class::named<core::int>();
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:19:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named;
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named;
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named);
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:20:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named();
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'named'.
+  Class<int><int>.named();
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named());
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:21:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int>;
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:21:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int>;
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named);
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:22:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int>();
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'named'.
+  Class<int><int>.named<int>();
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named<core::int>());
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:23:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int><int>;
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int><int>;
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named){dynamic}.<(#C2){dynamic}.>(core::_GrowableList::•<core::int>(0));
+  invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:24:8: Error: The operator '<' isn't defined for the class 'Type'.
+ - 'Type' is from 'dart:core'.
+Try correcting the operator to an existing operator, or defining a '<' operator.
+  Class<int><int>.named<int><int>();
+       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+ - 'List' is from 'dart:core'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
+  Class<int><int>.named<int><int>();
+                  ^^^^^" in core::_GrowableList::•<core::int>(0){<unresolved>}.named){dynamic}.<(#C2){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+    ;
+);
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = TypeLiteralConstant(self::Class<dynamic>*)
+  #C2 = TypeLiteralConstant(core::int*)
+}
diff --git a/pkg/vm_service/CHANGELOG.md b/pkg/vm_service/CHANGELOG.md
index 3c1a964..6b3803c 100644
--- a/pkg/vm_service/CHANGELOG.md
+++ b/pkg/vm_service/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Changelog
 
+## 7.3.0
+- Update to version `3.51` of the spec.
+- Added optional `reportLines` parameter to `getSourceReport` RPC.
+
 ## 7.1.1
 - Update to version `3.48` of the spec.
 - Added `shows` and `hides` properties to `LibraryDependency`.
diff --git a/pkg/vm_service/java/version.properties b/pkg/vm_service/java/version.properties
index 5e787ed..383674e 100644
--- a/pkg/vm_service/java/version.properties
+++ b/pkg/vm_service/java/version.properties
@@ -1 +1 @@
-version=3.49
+version=3.51
diff --git a/pkg/vm_service/lib/src/vm_service.dart b/pkg/vm_service/lib/src/vm_service.dart
index 77ce904..277b463 100644
--- a/pkg/vm_service/lib/src/vm_service.dart
+++ b/pkg/vm_service/lib/src/vm_service.dart
@@ -26,7 +26,7 @@
         HeapSnapshotObjectNoData,
         HeapSnapshotObjectNullData;
 
-const String vmServiceVersion = '3.49.0';
+const String vmServiceVersion = '3.51.0';
 
 /// @optional
 const String optional = 'optional';
@@ -817,6 +817,13 @@
   /// compilation error, which could terminate the running Dart program. If this
   /// parameter is not provided, it is considered to have the value `false`.
   ///
+  /// The `reportLines` parameter changes the token positions in
+  /// `SourceReportRange.possibleBreakpoints` and `SourceReportCoverage` to be
+  /// line numbers. This is designed to reduce the number of RPCs that need to
+  /// be performed in the case that the client is only interested in line
+  /// numbers. If this parameter is not provided, it is considered to have the
+  /// value `false`.
+  ///
   /// If `isolateId` refers to an isolate which has exited, then the `Collected`
   /// [Sentinel] is returned.
   ///
@@ -831,6 +838,7 @@
     int? tokenPos,
     int? endTokenPos,
     bool? forceCompile,
+    bool? reportLines,
   });
 
   /// The `getVersion` RPC is used to determine what version of the Service
@@ -1429,6 +1437,7 @@
             tokenPos: params['tokenPos'],
             endTokenPos: params['endTokenPos'],
             forceCompile: params['forceCompile'],
+            reportLines: params['reportLines'],
           );
           break;
         case 'getVersion':
@@ -1929,6 +1938,7 @@
     int? tokenPos,
     int? endTokenPos,
     bool? forceCompile,
+    bool? reportLines,
   }) =>
       _call('getSourceReport', {
         'isolateId': isolateId,
@@ -1937,6 +1947,7 @@
         if (tokenPos != null) 'tokenPos': tokenPos,
         if (endTokenPos != null) 'endTokenPos': endTokenPos,
         if (forceCompile != null) 'forceCompile': forceCompile,
+        if (reportLines != null) 'reportLines': reportLines,
       });
 
   @override
@@ -7287,12 +7298,12 @@
   static SourceReportCoverage? parse(Map<String, dynamic>? json) =>
       json == null ? null : SourceReportCoverage._fromJson(json);
 
-  /// A list of token positions in a SourceReportRange which have been executed.
-  /// The list is sorted.
+  /// A list of token positions (or line numbers if reportLines was enabled) in
+  /// a SourceReportRange which have been executed.  The list is sorted.
   List<int>? hits;
 
-  /// A list of token positions in a SourceReportRange which have not been
-  /// executed.  The list is sorted.
+  /// A list of token positions (or line numbers if reportLines was enabled) in
+  /// a SourceReportRange which have not been executed.  The list is sorted.
   List<int>? misses;
 
   SourceReportCoverage({
@@ -7352,9 +7363,9 @@
   SourceReportCoverage? coverage;
 
   /// Possible breakpoint information for this range, represented as a sorted
-  /// list of token positions.  Provided only when the when the
-  /// PossibleBreakpoint report has been requested and the range has been
-  /// compiled.
+  /// list of token positions (or line numbers if reportLines was enabled).
+  /// Provided only when the when the PossibleBreakpoint report has been
+  /// requested and the range has been compiled.
   @optional
   List<int>? possibleBreakpoints;
 
diff --git a/pkg/vm_service/pubspec.yaml b/pkg/vm_service/pubspec.yaml
index 5aad6b6..85b7cad 100644
--- a/pkg/vm_service/pubspec.yaml
+++ b/pkg/vm_service/pubspec.yaml
@@ -3,7 +3,7 @@
   A library to communicate with a service implementing the Dart VM
   service protocol.
 
-version: 7.1.1
+version: 7.3.0
 
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/vm_service
 
diff --git a/pkg/vm_service/test/coverage_leaf_function_test.dart b/pkg/vm_service/test/coverage_leaf_function_test.dart
index fd15551..36b9a88 100644
--- a/pkg/vm_service/test/coverage_leaf_function_test.dart
+++ b/pkg/vm_service/test/coverage_leaf_function_test.dart
@@ -27,9 +27,9 @@
   return true;
 }
 
-var tests = <IsolateTest>[
-  hasStoppedAtBreakpoint,
-  (VmService service, IsolateRef isolateRef) async {
+IsolateTest coverageTest(Map<String, dynamic> expectedRange,
+    {required bool reportLines}) {
+  return (VmService service, IsolateRef isolateRef) async {
     final isolateId = isolateRef.id!;
     final isolate = await service.getIsolate(isolateId);
     final stack = await service.getStack(isolateId);
@@ -43,8 +43,31 @@
     FuncRef funcRef =
         root.functions!.singleWhere((f) => f.name == 'leafFunction');
     Func func = await service.getObject(isolateId, funcRef.id!) as Func;
+    final location = func.location!;
 
-    final expectedRange = {
+    final report = await service.getSourceReport(
+      isolateId,
+      [SourceReportKind.kCoverage],
+      scriptId: location.script!.id,
+      tokenPos: location.tokenPos,
+      endTokenPos: location.endTokenPos,
+      forceCompile: true,
+      reportLines: reportLines,
+    );
+    expect(report.ranges!.length, 1);
+    expect(report.ranges![0].toJson(), expectedRange);
+    expect(report.scripts!.length, 1);
+    expect(
+      report.scripts![0].uri,
+      endsWith('coverage_leaf_function_test.dart'),
+    );
+  };
+}
+
+var tests = <IsolateTest>[
+  hasStoppedAtBreakpoint,
+  coverageTest(
+    {
       'scriptIndex': 0,
       'startPos': 397,
       'endPos': 447,
@@ -53,39 +76,26 @@
         'hits': [],
         'misses': [397]
       }
-    };
-    final location = func.location!;
-
-    final report = await service.getSourceReport(
-        isolateId, [SourceReportKind.kCoverage],
-        scriptId: location.script!.id,
-        tokenPos: location.tokenPos,
-        endTokenPos: location.endTokenPos,
-        forceCompile: true);
-    expect(report.ranges!.length, 1);
-    expect(report.ranges![0].toJson(), expectedRange);
-    expect(report.scripts!.length, 1);
-    expect(
-        report.scripts![0].uri, endsWith('coverage_leaf_function_test.dart'));
-  },
+    },
+    reportLines: false,
+  ),
+  coverageTest(
+    {
+      'scriptIndex': 0,
+      'startPos': 397,
+      'endPos': 447,
+      'compiled': true,
+      'coverage': {
+        'hits': [],
+        'misses': [11]
+      }
+    },
+    reportLines: true,
+  ),
   resumeIsolate,
   hasStoppedAtBreakpoint,
-  (VmService service, IsolateRef isolateRef) async {
-    final isolateId = isolateRef.id!;
-    final isolate = await service.getIsolate(isolateId);
-    final stack = await service.getStack(isolateId);
-
-    // Make sure we are in the right place.
-    expect(stack.frames!.length, greaterThanOrEqualTo(1));
-    expect(stack.frames![0].function!.name, 'testFunction');
-
-    final Library root =
-        await service.getObject(isolateId, isolate.rootLib!.id!) as Library;
-    FuncRef funcRef =
-        root.functions!.singleWhere((f) => f.name == 'leafFunction');
-    Func func = await service.getObject(isolateId, funcRef.id!) as Func;
-
-    var expectedRange = {
+  coverageTest(
+    {
       'scriptIndex': 0,
       'startPos': 397,
       'endPos': 447,
@@ -94,21 +104,22 @@
         'hits': [397],
         'misses': []
       }
-    };
-
-    final location = func.location!;
-    final report = await service.getSourceReport(
-        isolateId, [SourceReportKind.kCoverage],
-        scriptId: location.script!.id,
-        tokenPos: location.tokenPos,
-        endTokenPos: location.endTokenPos,
-        forceCompile: true);
-    expect(report.ranges!.length, 1);
-    expect(report.ranges![0].toJson(), expectedRange);
-    expect(report.scripts!.length, 1);
-    expect(
-        report.scripts![0].uri, endsWith('coverage_leaf_function_test.dart'));
-  },
+    },
+    reportLines: false,
+  ),
+  coverageTest(
+    {
+      'scriptIndex': 0,
+      'startPos': 397,
+      'endPos': 447,
+      'compiled': true,
+      'coverage': {
+        'hits': [11],
+        'misses': []
+      }
+    },
+    reportLines: true,
+  ),
 ];
 
 main([args = const <String>[]]) => runIsolateTests(
diff --git a/runtime/observatory/tests/service/get_version_rpc_test.dart b/runtime/observatory/tests/service/get_version_rpc_test.dart
index 6bec5f1..340b046 100644
--- a/runtime/observatory/tests/service/get_version_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_version_rpc_test.dart
@@ -12,7 +12,7 @@
     final result = await vm.invokeRpcNoUpgrade('getVersion', {});
     expect(result['type'], 'Version');
     expect(result['major'], 3);
-    expect(result['minor'], 50);
+    expect(result['minor'], 51);
     expect(result['_privateMajor'], 0);
     expect(result['_privateMinor'], 0);
   },
diff --git a/runtime/observatory_2/tests/service_2/get_version_rpc_test.dart b/runtime/observatory_2/tests/service_2/get_version_rpc_test.dart
index 31490bf..9b7cdf5 100644
--- a/runtime/observatory_2/tests/service_2/get_version_rpc_test.dart
+++ b/runtime/observatory_2/tests/service_2/get_version_rpc_test.dart
@@ -12,7 +12,7 @@
     final result = await vm.invokeRpcNoUpgrade('getVersion', {});
     expect(result['type'], equals('Version'));
     expect(result['major'], equals(3));
-    expect(result['minor'], equals(50));
+    expect(result['minor'], equals(51));
     expect(result['_privateMajor'], equals(0));
     expect(result['_privateMinor'], equals(0));
   },
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 4985582..2b43622 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -3353,6 +3353,9 @@
     compile_mode = SourceReport::kForceCompile;
   }
 
+  bool report_lines =
+      BoolParameter::Parse(js->LookupParam("reportLines"), false);
+
   Script& script = Script::Handle();
   intptr_t start_pos = UIntParameter::Parse(js->LookupParam("tokenPos"));
   intptr_t end_pos = UIntParameter::Parse(js->LookupParam("endTokenPos"));
@@ -3383,7 +3386,7 @@
       return;
     }
   }
-  SourceReport report(report_set, compile_mode);
+  SourceReport report(report_set, compile_mode, report_lines);
   report.PrintJSON(js, script, TokenPosition::Deserialize(start_pos),
                    TokenPosition::Deserialize(end_pos));
 #endif  // !DART_PRECOMPILED_RUNTIME
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index 4c87d36..38583b1 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -15,7 +15,7 @@
 namespace dart {
 
 #define SERVICE_PROTOCOL_MAJOR_VERSION 3
-#define SERVICE_PROTOCOL_MINOR_VERSION 50
+#define SERVICE_PROTOCOL_MINOR_VERSION 51
 
 class Array;
 class EmbedderServiceHandler;
diff --git a/runtime/vm/service/service.md b/runtime/vm/service/service.md
index 6e29e0f..5e9b1db 100644
--- a/runtime/vm/service/service.md
+++ b/runtime/vm/service/service.md
@@ -1,8 +1,8 @@
-# Dart VM Service Protocol 3.49
+# Dart VM Service Protocol 3.51
 
 > Please post feedback to the [observatory-discuss group][discuss-list]
 
-This document describes of _version 3.49_ of the Dart VM Service Protocol. This
+This document describes of _version 3.51_ of the Dart VM Service Protocol. This
 protocol is used to communicate with a running Dart Virtual Machine.
 
 To use the Service Protocol, start the VM with the *--observe* flag.
@@ -1059,7 +1059,8 @@
                                       string scriptId [optional],
                                       int tokenPos [optional],
                                       int endTokenPos [optional],
-                                      bool forceCompile [optional])
+                                      bool forceCompile [optional],
+                                      bool reportLines [optional])
 ```
 
 The _getSourceReport_ RPC is used to generate a set of reports tied to
@@ -1095,6 +1096,12 @@
 program.  If this parameter is not provided, it is considered to have
 the value _false_.
 
+The _reportLines_ parameter changes the token positions in
+_SourceReportRange.possibleBreakpoints_ and _SourceReportCoverage_ to be line
+numbers. This is designed to reduce the number of RPCs that need to be performed
+in the case that the client is only interested in line numbers. If this
+parameter is not provided, it is considered to have the value _false_.
+
 If _isolateId_ refers to an isolate which has exited, then the
 _Collected_ [Sentinel](#sentinel) is returned.
 
@@ -3781,12 +3788,12 @@
 
 ```
 class SourceReportCoverage {
-  // A list of token positions in a SourceReportRange which have been
-  // executed.  The list is sorted.
+  // A list of token positions (or line numbers if reportLines was enabled) in a
+  // SourceReportRange which have been executed.  The list is sorted.
   int[] hits;
 
-  // A list of token positions in a SourceReportRange which have not been
-  // executed.  The list is sorted.
+  // A list of token positions (or line numbers if reportLines was enabled) in a
+  // SourceReportRange which have not been executed.  The list is sorted.
   int[] misses;
 }
 ```
@@ -3836,9 +3843,9 @@
   SourceReportCoverage coverage [optional];
 
   // Possible breakpoint information for this range, represented as a
-  // sorted list of token positions.  Provided only when the when the
-  // PossibleBreakpoint report has been requested and the range has been
-  // compiled.
+  // sorted list of token positions (or line numbers if reportLines was
+  // enabled).  Provided only when the when the PossibleBreakpoint report has
+  // been requested and the range has been compiled.
   int[] possibleBreakpoints [optional];
 }
 ```
@@ -4176,5 +4183,6 @@
 3.48 | Added `Profiler` stream, `UserTagChanged` event kind, and `updatedTag` and `previousTag` properties to `Event`.
 3.49 | Added `CpuSamples` event kind, and `cpuSamples` property to `Event`.
 3.50 | Added `returnType`, `parameters`, and `typeParameters` to `@Instance`, and `implicit` to `@Function`. Added `Parameter` type.
+3.51 | Added optional `reportLines` parameter to `getSourceReport` RPC.
 
 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observatory-discuss
diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
index 1bd8a93..f72a72e 100644
--- a/runtime/vm/source_report.cc
+++ b/runtime/vm/source_report.cc
@@ -22,9 +22,12 @@
 const char* SourceReport::kPossibleBreakpointsStr = "PossibleBreakpoints";
 const char* SourceReport::kProfileStr = "_Profile";
 
-SourceReport::SourceReport(intptr_t report_set, CompileMode compile_mode)
+SourceReport::SourceReport(intptr_t report_set,
+                           CompileMode compile_mode,
+                           bool report_lines)
     : report_set_(report_set),
       compile_mode_(compile_mode),
+      report_lines_(report_lines),
       thread_(NULL),
       script_(NULL),
       start_pos_(TokenPosition::kMinSource),
@@ -218,6 +221,17 @@
   }
 }
 
+intptr_t SourceReport::GetTokenPosOrLine(const Script& script,
+                                         const TokenPosition& token_pos) {
+  if (!report_lines_) {
+    return token_pos.Pos();
+  }
+  intptr_t line = -1;
+  const bool found = script.GetTokenLocation(token_pos, &line);
+  ASSERT(found);
+  return line;
+}
+
 void SourceReport::PrintCoverageData(JSONObject* jsobj,
                                      const Function& function,
                                      const Code& code) {
@@ -230,6 +244,7 @@
   function.RestoreICDataMap(ic_data_array, false /* clone ic-data */);
   const PcDescriptors& descriptors =
       PcDescriptors::Handle(zone(), code.pc_descriptors());
+  const Script& script = Script::Handle(zone(), function.script());
 
   const int kCoverageNone = 0;
   const int kCoverageMiss = 1;
@@ -276,20 +291,24 @@
   JSONObject cov(jsobj, "coverage");
   {
     JSONArray hits(&cov, "hits");
+    TokenPosition pos = begin_pos;
     for (int i = 0; i < func_length; i++) {
       if (coverage[i] == kCoverageHit) {
-        // Add the token position of the hit.
-        hits.AddValue(begin_pos.Pos() + i);
+        // Add the token position or line number of the hit.
+        hits.AddValue(GetTokenPosOrLine(script, pos));
       }
+      pos = pos.Next();
     }
   }
   {
     JSONArray misses(&cov, "misses");
+    TokenPosition pos = begin_pos;
     for (int i = 0; i < func_length; i++) {
       if (coverage[i] == kCoverageMiss) {
-        // Add the token position of the miss.
-        misses.AddValue(begin_pos.Pos() + i);
+        // Add the token position or line number of the miss.
+        misses.AddValue(GetTokenPosOrLine(script, pos));
       }
+      pos = pos.Next();
     }
   }
 }
@@ -311,6 +330,7 @@
 
   const PcDescriptors& descriptors =
       PcDescriptors::Handle(zone(), code.pc_descriptors());
+  const Script& script = Script::Handle(zone(), func.script());
 
   PcDescriptors::Iterator iter(descriptors, kSafepointKind);
   while (iter.MoveNext()) {
@@ -324,11 +344,13 @@
   }
 
   JSONArray bpts(jsobj, "possibleBreakpoints");
+  TokenPosition pos = begin_pos;
   for (int i = 0; i < func_length; i++) {
     if (possible.Contains(i)) {
-      // Add the token position.
-      bpts.AddValue(begin_pos.Pos() + i);
+      // Add the token position or line number.
+      bpts.AddValue(GetTokenPosOrLine(script, pos));
     }
+    pos = pos.Next();
   }
 }
 
@@ -652,7 +674,7 @@
         JSONObject cov(&range, "coverage");
         {
           JSONArray hits(&cov, "hits");
-          hits.AddValue(begin_pos);
+          hits.AddValue(GetTokenPosOrLine(scriptRef, begin_pos));
         }
         {
           JSONArray misses(&cov, "misses");
diff --git a/runtime/vm/source_report.h b/runtime/vm/source_report.h
index a7acf00..070ca0a 100644
--- a/runtime/vm/source_report.h
+++ b/runtime/vm/source_report.h
@@ -38,7 +38,9 @@
 
   // report_set is a bitvector indicating which reports to generate
   // (e.g. kCallSites | kCoverage).
-  explicit SourceReport(intptr_t report_set, CompileMode compile = kNoCompile);
+  explicit SourceReport(intptr_t report_set,
+                        CompileMode compile = kNoCompile,
+                        bool report_lines = false);
   ~SourceReport();
 
   // Generate a source report for (some subrange of) a script.
@@ -66,6 +68,8 @@
   bool ShouldSkipField(const Field& field);
   intptr_t GetScriptIndex(const Script& script);
   bool ScriptIsLoadedByLibrary(const Script& script, const Library& lib);
+  intptr_t GetTokenPosOrLine(const Script& script,
+                             const TokenPosition& token_pos);
 
   void PrintCallSitesData(JSONObject* jsobj,
                           const Function& func,
@@ -126,6 +130,7 @@
 
   intptr_t report_set_;
   CompileMode compile_mode_;
+  bool report_lines_;
   Thread* thread_;
   const Script* script_;
   TokenPosition start_pos_;
diff --git a/tests/language/constructor/explicit_instantiation_syntax_test.dart b/tests/language/constructor/explicit_instantiation_syntax_test.dart
new file mode 100644
index 0000000..3b3ddd3
--- /dev/null
+++ b/tests/language/constructor/explicit_instantiation_syntax_test.dart
@@ -0,0 +1,299 @@
+// Copyright (c) 2021, 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.
+
+// SharedOptions=--enable-experiment=constructor-tearoffs
+
+import 'dart:core' hide dynamic;
+import 'dart:core' as core show dynamic;
+
+extension E<X> on X {
+  X operator <(_) => this;
+  X operator >(_) => this;
+  X operator <=(_) => this;
+  X operator >=(_) => this;
+  // X operator ==(_) => this; Member of object, can't be extension method.
+  X operator -(_) => this;
+  X operator +(_) => this;
+  X operator /(_) => this;
+  X operator ~/(_) => this;
+  X operator *(_) => this;
+  X operator %(_) => this;
+  X operator |(_) => this;
+  X operator ^(_) => this;
+  X operator &(_) => this;
+  X operator <<(_) => this;
+  X operator >>>(_) => this;
+  X operator >>(_) => this;
+
+  X operator -() => this;
+  X operator ~() => this;
+  X operator [](_) => this;
+  operator []=(_1, _2) => this;
+}
+
+class C<X, Y> {
+  C();
+  C.named();
+}
+
+void f(_1, _2) {}
+void g(_) {}
+void h(_1, [_2]) {}
+
+int i = 0;
+
+class Test {
+  var x;
+
+  void test() {
+    // Test the behavior of the parser on `id<id,id> ...` where the `...`
+    // stands for each of the tokens in Dart. In each case, additional tokens
+    // are added at the end, if this can make the construct parseable.
+    // `f` is used to force the parse to be two expressions; `g` is used to
+    // force the parse to be one expression; `h` is used to allow both (in
+    // cases where both possibilities must be a dead end).
+
+    f(C<int, int> !true);
+
+    g(C<int, int> != 1);
+
+    f(C<int, int> """ """);
+
+    f(C<int, int> "");
+
+    // `#!` is not a symbol, there's no way to make this work.
+    h(C<int, int> #!); //# 1: syntax error
+
+    f(C<int, int> #foo);
+
+    h(C<int, int> % 1); //# 2: syntax error
+    g((C<int, int>) % 1);
+
+    h(C<int, int> %= 1); //# 3: syntax error
+
+    h(true + C<int, int> && true); //# 4: syntax error
+    g(true + (C<int, int>) && true);
+
+    h(C<int, int> & 1); //# 5: syntax error
+    g((C<int, int>) & 1);
+
+    h(C<int, int> &= 1); //# 6: syntax error
+
+    g(C<int, int>());
+
+    g(C<int, int>);
+
+    h(C<int, int> * 1); //# 7: syntax error
+    g((C<int, int>) * 1);
+
+    h(C<int, int> */ 1); //# 8: syntax error
+
+    h(C<int, int> *= 1); //# 9: syntax error
+
+    h(C<int, int> + 1); //# 10: syntax error
+    g((C<int, int>) + 1);
+
+    f(C<int, int> ++ i);
+
+    h(C<int, int> += 1); //# 11: syntax error
+
+    f(C<int, int> , 1);
+
+    f(C<int, int> - 1);
+
+    f(C<int, int> -- i);
+
+    h(C<int, int> -= 1); //# 12: syntax error
+
+    g(C<int, int> . named());
+
+    g(C<int, int> .. toString());
+
+    h(C<int, int> ...); //# 13: syntax error
+
+    h(C<int, int> ...?); //# 14: syntax error
+
+    h(C<int, int> / 1); //# 15: syntax error
+    g((C<int, int>) / 1);
+
+    g(C<int, int> /**/); //# 16: ok
+    f(C<int, int> /**/ - 1);
+
+    g(C<int, int> //
+        );
+    f(C<int, int> //
+        -
+        1);
+
+    h(C<int, int> /= 1); //# 17: syntax error
+
+    g({C<int, int> : 1});
+
+    C<int, int> ; //# 18: ok
+
+    h(C<int, int> < 1); //# 19: syntax error
+    g((C<int, int>) < 1);
+
+    h(C<int, int> << 1); //# 20: syntax error
+    g((C<int, int>) << 1);
+
+    h(C<int, int> <<= 1); //# 21: syntax error
+
+    h(C<int, int> <= 1); //# 22: syntax error
+    g((C<int, int>) <= 1);
+
+    h(C<int, int> = 1); //# 23: syntax error
+
+    g(C<int, int> == 1);
+
+    h(C<int, int> =>); //# 24: syntax error
+
+    // The operator `>>` is a single token in the grammar.
+    h(C<int, int> > 1); //# 25: syntax error
+    h((C<int, int>) > 1);
+
+    h(true + C<int, int> ? 1 : 1); //# 26: syntax error
+    g(true + (C<int, int>) ? 1 : 1);
+
+    g(C<int, int> ?. toString()); //# 27: syntax error
+    g((C<int, int>) ?. toString()); //# 28: static type warning
+
+    h(C<int, int> ?.. toString()); //# 29: syntax error
+
+    h(C<int, int> ?? 1); //# 30: syntax error
+    g(null + (C<int, int>) ?? 1);
+
+    h(C<int, int> ??= 1); //# 31: syntax error
+
+    h(C<int, int> @deprecated 1); //# 32: syntax error
+
+    f(C<int, int> [ 1 ]);
+
+    f(C<int, int> '');
+
+    f(C<int, int> ''' ''');
+
+    g([ C<int, int> ]);
+
+    h(C<int, int> ^ 1); //# 33: syntax error
+    g((C<int, int>) ^ 1);
+
+    h(C<int, int> ^= 1); //# 34: syntax error
+
+    h(C<int, int> | 1); //# 35: syntax error
+    g((C<int, int>) | 1);
+
+    h(C<int, int> |= 1); //# 36: syntax error
+
+    h(true + C<int, int> || true); //# 37: syntax error
+    g(true + (C<int, int>) || true);
+
+    f(C<int, int> ~ 1);
+
+    h(C<int, int> ~/ 1); //# 38: syntax error
+    g((C<int, int>) ~/ 1);
+
+    h(C<int, int> ~/= 1); //# 39: syntax error
+
+    f(C<int, int> {});
+    g({ C<int, int> });
+
+    // Keywords with no special status.
+    {
+      var async, hide, of, on, show, sync;
+      f(C<int, int> async);
+      f(C<int, int> hide);
+      f(C<int, int> of);
+      f(C<int, int> on);
+      f(C<int, int> show);
+      f(C<int, int> sync);
+    }
+
+    // Contextual reserved words (no special status here).
+    {
+      var await, yield;
+      f(C<int, int> await);
+      f(C<int, int> yield);
+    }
+
+    // Built-in identifiers.
+    {
+      var abstract, as, covariant, deferred, dynamic, export;
+      var extension, external, factory, Function, get, implements;
+      var import, interface, late, library, mixin, operator, part;
+      var required, set, static, typedef;
+      f(C<int, int> abstract);
+      f(C<int, int> as);
+      g((C<int, int>) as core.dynamic);
+      f(C<int, int> covariant);
+      f(C<int, int> deferred);
+      f(C<int, int> dynamic);
+      f(C<int, int> export);
+      f(C<int, int> extension);
+      f(C<int, int> external);
+      f(C<int, int> factory);
+      f(C<int, int> Function);
+      f(C<int, int> get);
+      f(C<int, int> implements);
+      f(C<int, int> import);
+      f(C<int, int> interface);
+      f(C<int, int> late);
+      f(C<int, int> library);
+      f(C<int, int> mixin);
+      f(C<int, int> operator);
+      f(C<int, int> part);
+      f(C<int, int> required);
+      f(C<int, int> set);
+      f(C<int, int> static);
+      f(C<int, int> typedef);
+    }
+
+    // Reserved words.
+    h(C<int, int> assert(true)); //# 40: syntax error
+    switch (1) {
+      case 0: C<int, int> break; //# 41: syntax error
+      C<int, int> case 1: break; //# 42: syntax error
+    }
+    h(C<int, int> catch); //# 43: syntax error
+    h(C<int, int> class D {}); //# 44: syntax error
+    f(C<int, int> const []);
+    while (++i < 10) {
+      C<int, int> continue; //# 45: syntax error
+    }
+    h(C<int, int> default); //# 46: syntax error
+    h(C<int, int> do); //# 47: syntax error
+    h(C<int, int> else); //# 48: syntax error
+    h(C<int, int> enum {}); //# 49: syntax error
+    h(C<int, int> extends C); //# 50: syntax error
+    f(C<int, int> false);
+    h(C<int, int> final); //# 51: syntax error
+    h(C<int, int> finally); //# 52: syntax error
+    h(C<int, int> for); //# 53: syntax error
+    h(C<int, int> if); //# 54: syntax error
+    h(C<int, int> in); //# 55: syntax error
+    h(C<int, int> is Object); //# 56: syntax error
+    g((C<int, int>) is Object);
+    f(C<int, int> new C());
+    f(C<int, int> null);
+    h(C<int, int> rethrow); //# 57: syntax error
+    h(C<int, int> return); //# 58: syntax error
+    f(C<int, int> super.toString);
+    h(C<int, int> switch); //# 59: syntax error
+    f(C<int, int> this.x);
+
+    // Right operand of `>` is a `<bitwiseOrExpression>`, and `throw 0` isn't.
+    h(C<int, int> throw 0); //# 60: syntax error
+
+    f(C<int, int> true);
+    h(C<int, int> try); //# 61: syntax error
+    h(C<int, int> var); //# 62: syntax error
+    h(C<int, int> void); //# 63: syntax error
+    h(C<int, int> while); //# 64: syntax error
+    h(C<int, int> with); //# 65: syntax error
+  }
+}
+
+void main() {
+  Test().test();
+}
diff --git a/tools/VERSION b/tools/VERSION
index d596d4b..a2c0a9e 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 15
 PATCH 0
-PRERELEASE 60
+PRERELEASE 61
 PRERELEASE_PATCH 0
\ No newline at end of file