[cfe] Forbid super-bounded typedef types as constructors

Closes #45658.
Closes #45670.

Bug: https://github.com/dart-lang/sdk/issues/45658
Bug: https://github.com/dart-lang/sdk/issues/45670
Change-Id: I5b588794a63f7b0aef84c3731ca26624ca8ff23a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195518
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
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 1f26ed0..8fc537e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -1301,12 +1301,14 @@
   void _unaliasTypeAliasedConstructorInvocations() {
     for (TypeAliasedConstructorInvocationJudgment invocation
         in typeAliasedConstructorInvocations) {
+      bool inferred = !hasExplicitTypeArguments(invocation.arguments);
       DartType aliasedType = new TypedefType(
           invocation.typeAliasBuilder.typedef,
           Nullability.nonNullable,
           invocation.arguments.types);
       libraryBuilder.checkBoundsInType(
-          aliasedType, typeEnvironment, uri, invocation.fileOffset);
+          aliasedType, typeEnvironment, uri, invocation.fileOffset,
+          allowSuperBounded: false, inferred: inferred);
       DartType unaliasedType = aliasedType.unalias;
       List<DartType> invocationTypeArguments = null;
       if (unaliasedType is InterfaceType) {
@@ -1325,12 +1327,14 @@
   void _unaliasTypeAliasedFactoryInvocations() {
     for (TypeAliasedFactoryInvocationJudgment invocation
         in typeAliasedFactoryInvocations) {
+      bool inferred = !hasExplicitTypeArguments(invocation.arguments);
       DartType aliasedType = new TypedefType(
           invocation.typeAliasBuilder.typedef,
           Nullability.nonNullable,
           invocation.arguments.types);
       libraryBuilder.checkBoundsInType(
-          aliasedType, typeEnvironment, uri, invocation.fileOffset);
+          aliasedType, typeEnvironment, uri, invocation.fileOffset,
+          allowSuperBounded: false, inferred: inferred);
       DartType unaliasedType = aliasedType.unalias;
       List<DartType> invocationTypeArguments = null;
       if (unaliasedType is InterfaceType) {
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index 6bf25ce..3e36973 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -817,10 +817,6 @@
     node.hasBeenInferred = true;
     Expression resultNode = node;
     if (!inferrer.isTopLevel) {
-      SourceLibraryBuilder library = inferrer.library;
-      library.checkBoundsInType(result.inferredType,
-          inferrer.typeSchemaEnvironment, inferrer.helper.uri, node.fileOffset,
-          inferred: true, allowSuperBounded: false);
       if (inferrer.isNonNullableByDefault) {
         if (node.target == inferrer.coreTypes.listDefaultConstructor) {
           resultNode = inferrer.helper.wrapInProblem(node,
@@ -845,10 +841,6 @@
     node.hasBeenInferred = true;
     Expression resultNode = node;
     if (!inferrer.isTopLevel) {
-      SourceLibraryBuilder library = inferrer.library;
-      library.checkBoundsInType(result.inferredType,
-          inferrer.typeSchemaEnvironment, inferrer.helper.uri, node.fileOffset,
-          inferred: true, allowSuperBounded: false);
       if (inferrer.isNonNullableByDefault) {
         if (node.target == inferrer.coreTypes.listDefaultConstructor) {
           resultNode = inferrer.helper.wrapInProblem(node,
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.strong.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.strong.expect
index 29df1fe..99ac769 100644
--- a/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.strong.expect
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.strong.expect
@@ -2,16 +2,6 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:14:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'.
-//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
-//  - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-//   B(); // Error.
-//   ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:5:9: Context: This is the type variable whose bound isn't conformed to.
-// class A<X extends A<X>> {}
-//         ^
-//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:15:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
 //  - 'Object' is from 'dart:core'.
@@ -22,16 +12,6 @@
 // class A<X extends A<X>> {}
 //         ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'.
-//  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
-//  - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-//   B2(); // Error.
-//   ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:8:10: Context: This is the type variable whose bound isn't conformed to.
-// class A2<X extends A2<X>> {
-//          ^
-//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:17:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'.
 //  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
 //  - 'Object' is from 'dart:core'.
@@ -42,6 +22,36 @@
 // class A2<X extends A2<X>> {
 //          ^
 //
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:14:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'B'.
+//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   B(); // Error.
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:6:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends A<X>> = A<X>;
+//           ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'B2'.
+//  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   B2(); // Error.
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:11:12: Context: This is the type variable whose bound isn't conformed to.
+// typedef B2<X extends A2<X>> = A2<X>;
+//            ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'.
+//  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   B2(); // Error.
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:8:10: Context: This is the type variable whose bound isn't conformed to.
+// class A2<X extends A2<X>> {
+//          ^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.strong.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.strong.transformed.expect
index 29df1fe..99ac769 100644
--- a/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.strong.transformed.expect
@@ -2,16 +2,6 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:14:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'.
-//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
-//  - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-//   B(); // Error.
-//   ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:5:9: Context: This is the type variable whose bound isn't conformed to.
-// class A<X extends A<X>> {}
-//         ^
-//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:15:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
 //  - 'Object' is from 'dart:core'.
@@ -22,16 +12,6 @@
 // class A<X extends A<X>> {}
 //         ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'.
-//  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
-//  - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-//   B2(); // Error.
-//   ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:8:10: Context: This is the type variable whose bound isn't conformed to.
-// class A2<X extends A2<X>> {
-//          ^
-//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:17:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'.
 //  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
 //  - 'Object' is from 'dart:core'.
@@ -42,6 +22,36 @@
 // class A2<X extends A2<X>> {
 //          ^
 //
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:14:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'B'.
+//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   B(); // Error.
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:6:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends A<X>> = A<X>;
+//           ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'B2'.
+//  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   B2(); // Error.
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:11:12: Context: This is the type variable whose bound isn't conformed to.
+// typedef B2<X extends A2<X>> = A2<X>;
+//            ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'.
+//  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   B2(); // Error.
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:8:10: Context: This is the type variable whose bound isn't conformed to.
+// class A2<X extends A2<X>> {
+//          ^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.weak.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.weak.expect
index 29df1fe..99ac769 100644
--- a/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.weak.expect
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.weak.expect
@@ -2,16 +2,6 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:14:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'.
-//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
-//  - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-//   B(); // Error.
-//   ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:5:9: Context: This is the type variable whose bound isn't conformed to.
-// class A<X extends A<X>> {}
-//         ^
-//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:15:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
 //  - 'Object' is from 'dart:core'.
@@ -22,16 +12,6 @@
 // class A<X extends A<X>> {}
 //         ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'.
-//  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
-//  - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-//   B2(); // Error.
-//   ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:8:10: Context: This is the type variable whose bound isn't conformed to.
-// class A2<X extends A2<X>> {
-//          ^
-//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:17:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'.
 //  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
 //  - 'Object' is from 'dart:core'.
@@ -42,6 +22,36 @@
 // class A2<X extends A2<X>> {
 //          ^
 //
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:14:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'B'.
+//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   B(); // Error.
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:6:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends A<X>> = A<X>;
+//           ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'B2'.
+//  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   B2(); // Error.
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:11:12: Context: This is the type variable whose bound isn't conformed to.
+// typedef B2<X extends A2<X>> = A2<X>;
+//            ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'.
+//  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   B2(); // Error.
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:8:10: Context: This is the type variable whose bound isn't conformed to.
+// class A2<X extends A2<X>> {
+//          ^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.weak.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.weak.transformed.expect
index 29df1fe..99ac769 100644
--- a/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart.weak.transformed.expect
@@ -2,16 +2,6 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:14:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'.
-//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
-//  - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-//   B(); // Error.
-//   ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:5:9: Context: This is the type variable whose bound isn't conformed to.
-// class A<X extends A<X>> {}
-//         ^
-//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:15:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
 //  - 'Object' is from 'dart:core'.
@@ -22,16 +12,6 @@
 // class A<X extends A<X>> {}
 //         ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'.
-//  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
-//  - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-//   B2(); // Error.
-//   ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:8:10: Context: This is the type variable whose bound isn't conformed to.
-// class A2<X extends A2<X>> {
-//          ^
-//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:17:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'.
 //  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
 //  - 'Object' is from 'dart:core'.
@@ -42,6 +22,36 @@
 // class A2<X extends A2<X>> {
 //          ^
 //
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:14:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'B'.
+//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   B(); // Error.
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:6:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends A<X>> = A<X>;
+//           ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'B2'.
+//  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   B2(); // Error.
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:11:12: Context: This is the type variable whose bound isn't conformed to.
+// typedef B2<X extends A2<X>> = A2<X>;
+//            ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'.
+//  - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   B2(); // Error.
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:8:10: Context: This is the type variable whose bound isn't conformed to.
+// class A2<X extends A2<X>> {
+//          ^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.strong.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.strong.expect
index 15fe25b..b0f5897 100644
--- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.strong.expect
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.strong.expect
@@ -12,16 +12,6 @@
 // class A<X extends A<X>> {}
 //         ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:33:9: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'.
-//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
-//  - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-//     new C();
-//         ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:13:9: Context: This is the type variable whose bound isn't conformed to.
-// class A<X extends A<X>> {}
-//         ^
-//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:34:7: Error: Inferred type argument 'Object?' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'call'.
 //  - 'Object' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
@@ -86,6 +76,16 @@
 //     instance2(() => captureTypeArgument());
 //     ^
 //
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:33:9: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'C'.
+//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//     new C();
+//         ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:14:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef C<X extends A<X>> = A<X>;
+//           ^
+//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:47:11: Error: Inferred type argument 'Object?' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'Subclass.instance1'.
 //  - 'Object' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.strong.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.strong.transformed.expect
index 15fe25b..b0f5897 100644
--- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.strong.transformed.expect
@@ -12,16 +12,6 @@
 // class A<X extends A<X>> {}
 //         ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:33:9: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'.
-//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
-//  - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-//     new C();
-//         ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:13:9: Context: This is the type variable whose bound isn't conformed to.
-// class A<X extends A<X>> {}
-//         ^
-//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:34:7: Error: Inferred type argument 'Object?' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'call'.
 //  - 'Object' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
@@ -86,6 +76,16 @@
 //     instance2(() => captureTypeArgument());
 //     ^
 //
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:33:9: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'C'.
+//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//     new C();
+//         ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:14:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef C<X extends A<X>> = A<X>;
+//           ^
+//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:47:11: Error: Inferred type argument 'Object?' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'Subclass.instance1'.
 //  - 'Object' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.weak.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.weak.expect
index 15fe25b..b0f5897 100644
--- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.weak.expect
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.weak.expect
@@ -12,16 +12,6 @@
 // class A<X extends A<X>> {}
 //         ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:33:9: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'.
-//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
-//  - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-//     new C();
-//         ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:13:9: Context: This is the type variable whose bound isn't conformed to.
-// class A<X extends A<X>> {}
-//         ^
-//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:34:7: Error: Inferred type argument 'Object?' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'call'.
 //  - 'Object' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
@@ -86,6 +76,16 @@
 //     instance2(() => captureTypeArgument());
 //     ^
 //
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:33:9: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'C'.
+//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//     new C();
+//         ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:14:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef C<X extends A<X>> = A<X>;
+//           ^
+//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:47:11: Error: Inferred type argument 'Object?' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'Subclass.instance1'.
 //  - 'Object' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.weak.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.weak.transformed.expect
index 15fe25b..b0f5897 100644
--- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart.weak.transformed.expect
@@ -12,16 +12,6 @@
 // class A<X extends A<X>> {}
 //         ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:33:9: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'.
-//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
-//  - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-//     new C();
-//         ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:13:9: Context: This is the type variable whose bound isn't conformed to.
-// class A<X extends A<X>> {}
-//         ^
-//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:34:7: Error: Inferred type argument 'Object?' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'call'.
 //  - 'Object' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
@@ -86,6 +76,16 @@
 //     instance2(() => captureTypeArgument());
 //     ^
 //
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:33:9: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'C'.
+//  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//     new C();
+//         ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:14:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef C<X extends A<X>> = A<X>;
+//           ^
+//
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart:47:11: Error: Inferred type argument 'Object?' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'Subclass.instance1'.
 //  - 'Object' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45464.dart'.
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.strong.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.strong.expect
index 2e82e80..88129af 100644
--- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.strong.expect
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.strong.expect
@@ -2,95 +2,65 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Error: Type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
 //  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   A.foo(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef A<X extends G<C<X>>> = C<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Context: If you want 'A<C<Object?> Function(C<Never>)>' to be a super-bounded type, note that the inverted type 'A<G<C<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   A.foo(); // Error.
-//     ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Error: Type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
 //  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   B(); // Error.
 //   ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef B<X extends G<D<X>>> = D<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Context: If you want 'B<D<Object?> Function(D<Never>)>' to be a super-bounded type, note that the inverted type 'B<G<D<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   B(); // Error.
-//   ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Error: Type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
 //  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   A(); // Error.
 //   ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef A<X extends G<C<X>>> = C<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Context: If you want 'A<C<Object?> Function(C<Never>)>' to be a super-bounded type, note that the inverted type 'A<G<C<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   A(); // Error.
-//   ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Error: Type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
 //  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   A.bar(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef A<X extends G<C<X>>> = C<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Context: If you want 'A<C<Object?> Function(C<Never>)>' to be a super-bounded type, note that the inverted type 'A<G<C<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   A.bar(); // Error.
-//     ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Error: Type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
 //  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   B.foo(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef B<X extends G<D<X>>> = D<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Context: If you want 'B<D<Object?> Function(D<Never>)>' to be a super-bounded type, note that the inverted type 'B<G<D<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   B.foo(); // Error.
-//     ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Error: Type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
 //  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   B.bar(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef B<X extends G<D<X>>> = D<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Context: If you want 'B<D<Object?> Function(D<Never>)>' to be a super-bounded type, note that the inverted type 'B<G<D<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   B.bar(); // Error.
-//     ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.strong.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.strong.transformed.expect
index e2f8dde..eab7fa2 100644
--- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.strong.transformed.expect
@@ -2,95 +2,65 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Error: Type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
 //  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   A.foo(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef A<X extends G<C<X>>> = C<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Context: If you want 'A<C<Object?> Function(C<Never>)>' to be a super-bounded type, note that the inverted type 'A<G<C<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   A.foo(); // Error.
-//     ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Error: Type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
 //  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   B(); // Error.
 //   ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef B<X extends G<D<X>>> = D<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Context: If you want 'B<D<Object?> Function(D<Never>)>' to be a super-bounded type, note that the inverted type 'B<G<D<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   B(); // Error.
-//   ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Error: Type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
 //  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   A(); // Error.
 //   ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef A<X extends G<C<X>>> = C<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Context: If you want 'A<C<Object?> Function(C<Never>)>' to be a super-bounded type, note that the inverted type 'A<G<C<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   A(); // Error.
-//   ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Error: Type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
 //  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   A.bar(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef A<X extends G<C<X>>> = C<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Context: If you want 'A<C<Object?> Function(C<Never>)>' to be a super-bounded type, note that the inverted type 'A<G<C<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   A.bar(); // Error.
-//     ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Error: Type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
 //  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   B.foo(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef B<X extends G<D<X>>> = D<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Context: If you want 'B<D<Object?> Function(D<Never>)>' to be a super-bounded type, note that the inverted type 'B<G<D<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   B.foo(); // Error.
-//     ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Error: Type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
 //  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   B.bar(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef B<X extends G<D<X>>> = D<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Context: If you want 'B<D<Object?> Function(D<Never>)>' to be a super-bounded type, note that the inverted type 'B<G<D<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   B.bar(); // Error.
-//     ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.weak.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.weak.expect
index 2e82e80..88129af 100644
--- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.weak.expect
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.weak.expect
@@ -2,95 +2,65 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Error: Type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
 //  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   A.foo(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef A<X extends G<C<X>>> = C<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Context: If you want 'A<C<Object?> Function(C<Never>)>' to be a super-bounded type, note that the inverted type 'A<G<C<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   A.foo(); // Error.
-//     ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Error: Type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
 //  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   B(); // Error.
 //   ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef B<X extends G<D<X>>> = D<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Context: If you want 'B<D<Object?> Function(D<Never>)>' to be a super-bounded type, note that the inverted type 'B<G<D<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   B(); // Error.
-//   ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Error: Type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
 //  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   A(); // Error.
 //   ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef A<X extends G<C<X>>> = C<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Context: If you want 'A<C<Object?> Function(C<Never>)>' to be a super-bounded type, note that the inverted type 'A<G<C<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   A(); // Error.
-//   ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Error: Type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
 //  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   A.bar(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef A<X extends G<C<X>>> = C<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Context: If you want 'A<C<Object?> Function(C<Never>)>' to be a super-bounded type, note that the inverted type 'A<G<C<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   A.bar(); // Error.
-//     ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Error: Type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
 //  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   B.foo(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef B<X extends G<D<X>>> = D<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Context: If you want 'B<D<Object?> Function(D<Never>)>' to be a super-bounded type, note that the inverted type 'B<G<D<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   B.foo(); // Error.
-//     ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Error: Type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
 //  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   B.bar(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef B<X extends G<D<X>>> = D<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Context: If you want 'B<D<Object?> Function(D<Never>)>' to be a super-bounded type, note that the inverted type 'B<G<D<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   B.bar(); // Error.
-//     ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.weak.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.weak.transformed.expect
index e2f8dde..eab7fa2 100644
--- a/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart.weak.transformed.expect
@@ -2,95 +2,65 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Error: Type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
 //  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   A.foo(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef A<X extends G<C<X>>> = C<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Context: If you want 'A<C<Object?> Function(C<Never>)>' to be a super-bounded type, note that the inverted type 'A<G<C<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   A.foo(); // Error.
-//     ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Error: Type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
 //  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   B(); // Error.
 //   ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef B<X extends G<D<X>>> = D<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Context: If you want 'B<D<Object?> Function(D<Never>)>' to be a super-bounded type, note that the inverted type 'B<G<D<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   B(); // Error.
-//   ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Error: Type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
 //  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   A(); // Error.
 //   ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef A<X extends G<C<X>>> = C<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Context: If you want 'A<C<Object?> Function(C<Never>)>' to be a super-bounded type, note that the inverted type 'A<G<C<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   A(); // Error.
-//   ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Error: Type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'.
 //  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   A.bar(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef A<X extends G<C<X>>> = C<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Context: If you want 'A<C<Object?> Function(C<Never>)>' to be a super-bounded type, note that the inverted type 'A<G<C<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   A.bar(); // Error.
-//     ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Error: Type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
 //  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   B.foo(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef B<X extends G<D<X>>> = D<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Context: If you want 'B<D<Object?> Function(D<Never>)>' to be a super-bounded type, note that the inverted type 'B<G<D<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   B.foo(); // Error.
-//     ^
 //
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Error: Type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'.
 //  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
 //  - 'Object' is from 'dart:core'.
-// Try changing type arguments so that they conform to the bounds.
+// Try specifying type arguments explicitly so that they conform to the bounds.
 //   B.bar(); // Error.
 //     ^
 // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to.
 // typedef B<X extends G<D<X>>> = D<X>;
 //           ^
-// pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Context: If you want 'B<D<Object?> Function(D<Never>)>' to be a super-bounded type, note that the inverted type 'B<G<D<Never>>>' must then satisfy its bounds, which it does not.
-//  - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'.
-//  - 'Object' is from 'dart:core'.
-//   B.bar(); // Error.
-//     ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart
new file mode 100644
index 0000000..b3f0c1a
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart
@@ -0,0 +1,17 @@
+// 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 C<X> {
+  C();
+  factory C.foo() => new C();
+}
+
+typedef A<X extends C<X>> = C<X>;
+
+foo() {
+  A();
+  A.foo();
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.strong.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.strong.expect
new file mode 100644
index 0000000..502ae56
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.strong.expect
@@ -0,0 +1,40 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:13:3: Error: Inferred type argument 'C<Object?>' doesn't conform to the bound 'C<X>' of the type variable 'X' on 'A'.
+//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   A();
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef A<X extends C<X>> = C<X>;
+//           ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:14:5: Error: Inferred type argument 'C<Object?>' doesn't conform to the bound 'C<X>' of the type variable 'X' on 'A'.
+//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   A.foo();
+//     ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef A<X extends C<X>> = C<X>;
+//           ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef A<X extends self::C<X> = self::C<dynamic>> = self::C<X>;
+class C<X extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::C<self::C::X%>
+    : super core::Object::•()
+    ;
+  static factory foo<X extends core::Object? = dynamic>() → self::C<self::C::foo::X%>
+    return new self::C::•<self::C::foo::X%>();
+}
+static method foo() → dynamic {
+  new self::C::•<self::C<core::Object?>>();
+  self::C::foo<self::C<core::Object?>>();
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.strong.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.strong.transformed.expect
new file mode 100644
index 0000000..502ae56
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.strong.transformed.expect
@@ -0,0 +1,40 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:13:3: Error: Inferred type argument 'C<Object?>' doesn't conform to the bound 'C<X>' of the type variable 'X' on 'A'.
+//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   A();
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef A<X extends C<X>> = C<X>;
+//           ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:14:5: Error: Inferred type argument 'C<Object?>' doesn't conform to the bound 'C<X>' of the type variable 'X' on 'A'.
+//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   A.foo();
+//     ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef A<X extends C<X>> = C<X>;
+//           ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef A<X extends self::C<X> = self::C<dynamic>> = self::C<X>;
+class C<X extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::C<self::C::X%>
+    : super core::Object::•()
+    ;
+  static factory foo<X extends core::Object? = dynamic>() → self::C<self::C::foo::X%>
+    return new self::C::•<self::C::foo::X%>();
+}
+static method foo() → dynamic {
+  new self::C::•<self::C<core::Object?>>();
+  self::C::foo<self::C<core::Object?>>();
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.textual_outline.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.textual_outline.expect
new file mode 100644
index 0000000..c536c5a
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.textual_outline.expect
@@ -0,0 +1,8 @@
+class C<X> {
+  C();
+  factory C.foo() => new C();
+}
+
+typedef A<X extends C<X>> = C<X>;
+foo() {}
+main() {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..39bcd94
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.textual_outline_modelled.expect
@@ -0,0 +1,8 @@
+class C<X> {
+  C();
+  factory C.foo() => new C();
+}
+
+foo() {}
+main() {}
+typedef A<X extends C<X>> = C<X>;
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.weak.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.weak.expect
new file mode 100644
index 0000000..502ae56
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.weak.expect
@@ -0,0 +1,40 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:13:3: Error: Inferred type argument 'C<Object?>' doesn't conform to the bound 'C<X>' of the type variable 'X' on 'A'.
+//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   A();
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef A<X extends C<X>> = C<X>;
+//           ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:14:5: Error: Inferred type argument 'C<Object?>' doesn't conform to the bound 'C<X>' of the type variable 'X' on 'A'.
+//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   A.foo();
+//     ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef A<X extends C<X>> = C<X>;
+//           ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef A<X extends self::C<X> = self::C<dynamic>> = self::C<X>;
+class C<X extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::C<self::C::X%>
+    : super core::Object::•()
+    ;
+  static factory foo<X extends core::Object? = dynamic>() → self::C<self::C::foo::X%>
+    return new self::C::•<self::C::foo::X%>();
+}
+static method foo() → dynamic {
+  new self::C::•<self::C<core::Object?>>();
+  self::C::foo<self::C<core::Object?>>();
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.weak.outline.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.weak.outline.expect
new file mode 100644
index 0000000..d911298
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.weak.outline.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef A<X extends self::C<X> = self::C<dynamic>> = self::C<X>;
+class C<X extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::C<self::C::X%>
+    ;
+  static factory foo<X extends core::Object? = dynamic>() → self::C<self::C::foo::X%>
+    ;
+}
+static method foo() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.weak.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.weak.transformed.expect
new file mode 100644
index 0000000..502ae56
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart.weak.transformed.expect
@@ -0,0 +1,40 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:13:3: Error: Inferred type argument 'C<Object?>' doesn't conform to the bound 'C<X>' of the type variable 'X' on 'A'.
+//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   A();
+//   ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef A<X extends C<X>> = C<X>;
+//           ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:14:5: Error: Inferred type argument 'C<Object?>' doesn't conform to the bound 'C<X>' of the type variable 'X' on 'A'.
+//  - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart'.
+//  - 'Object' is from 'dart:core'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
+//   A.foo();
+//     ^
+// pkg/front_end/testcases/nonfunction_type_aliases/issue45658.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef A<X extends C<X>> = C<X>;
+//           ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef A<X extends self::C<X> = self::C<dynamic>> = self::C<X>;
+class C<X extends core::Object? = dynamic> extends core::Object {
+  constructor •() → self::C<self::C::X%>
+    : super core::Object::•()
+    ;
+  static factory foo<X extends core::Object? = dynamic>() → self::C<self::C::foo::X%>
+    return new self::C::•<self::C::foo::X%>();
+}
+static method foo() → dynamic {
+  new self::C::•<self::C<core::Object?>>();
+  self::C::foo<self::C<core::Object?>>();
+}
+static method main() → dynamic {}