Version 2.13.0-180.0.dev
Merge commit '0a1a5276ba131c8068ba03c7f8b805fb995b1ceb' into 'dev'
diff --git a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
index 86e27d1..1833d4f 100644
--- a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
@@ -244,8 +244,23 @@
}
}
- return declaration.buildType(
- library, nullabilityBuilder, arguments, notInstanceContext);
+ if (library is SourceLibraryBuilder) {
+ int uncheckedTypedefTypeCount = library.uncheckedTypedefTypes.length;
+ DartType builtType = declaration.buildType(
+ library, nullabilityBuilder, arguments, notInstanceContext);
+ // Set locations for new unchecked TypedefTypes for error reporting.
+ for (int i = uncheckedTypedefTypeCount;
+ i < library.uncheckedTypedefTypes.length;
+ ++i) {
+ library.uncheckedTypedefTypes[i]
+ ..fileUri ??= fileUri
+ ..offset ??= charOffset;
+ }
+ return builtType;
+ } else {
+ return declaration.buildType(
+ library, nullabilityBuilder, arguments, notInstanceContext);
+ }
}
Supertype buildSupertype(
diff --git a/pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart b/pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart
index 6737b87..871917c 100644
--- a/pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart
@@ -6,14 +6,7 @@
library fasta.function_type_alias_builder;
-import 'package:kernel/ast.dart'
- show
- DartType,
- DynamicType,
- InvalidType,
- Nullability,
- TypeParameter,
- Typedef;
+import 'package:kernel/ast.dart';
import 'package:kernel/core_types.dart';
import 'package:kernel/type_algebra.dart' show substitute, uniteNullabilities;
@@ -28,6 +21,7 @@
messageTypedefTypeVariableNotConstructorCause;
import '../problems.dart' show unhandled;
+import '../source/source_library_builder.dart';
import '../util/helpers.dart';
import 'class_builder.dart';
@@ -146,6 +140,17 @@
for (int i = 0; i < typedef.typeParameters.length; i++) {
substitution[typedef.typeParameters[i]] = arguments[i];
}
+ // The following adds the built type to the list of unchecked typedef types
+ // of the client library. It is needed because the type is built unaliased,
+ // and at the time of the check it wouldn't be possible to see if the type
+ // arguments to the generic typedef conform to the bounds without preserving
+ // the TypedefType for the delayed check.
+ if (library is SourceLibraryBuilder &&
+ arguments.isNotEmpty &&
+ thisType is! FunctionType) {
+ library.uncheckedTypedefTypes.add(new UncheckedTypedefType(
+ new TypedefType(typedef, nullability, arguments)));
+ }
return substitute(result, substitution);
}
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 fc29eb6..927f9e8 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -1081,6 +1081,7 @@
resolveRedirectingFactoryTargets();
finishVariableMetadata();
+ libraryBuilder.checkUncheckedTypedefTypes(typeEnvironment);
}
void checkAsyncReturnType(AsyncMarker asyncModifier, DartType returnType,
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 e9004a2..96b6ff5 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -575,8 +575,10 @@
List<MetadataBuilder> metadata = pop();
checkEmpty(beginToken.charOffset);
if (name is ParserRecovery) {
- libraryBuilder.endNestedDeclaration(
- TypeParameterScopeKind.classDeclaration, "<syntax-error>");
+ libraryBuilder
+ .endNestedDeclaration(
+ TypeParameterScopeKind.classDeclaration, "<syntax-error>")
+ .resolveTypes(typeVariables, libraryBuilder);
return;
}
@@ -659,8 +661,10 @@
List<MetadataBuilder> metadata = pop(NullValue.Metadata);
checkEmpty(mixinToken.charOffset);
if (name is ParserRecovery) {
- libraryBuilder.endNestedDeclaration(
- TypeParameterScopeKind.mixinDeclaration, "<syntax-error>");
+ libraryBuilder
+ .endNestedDeclaration(
+ TypeParameterScopeKind.mixinDeclaration, "<syntax-error>")
+ .resolveTypes(typeVariables, libraryBuilder);
return;
}
int startOffset =
@@ -1255,8 +1259,10 @@
List<MetadataBuilder> metadata = pop();
checkEmpty(beginToken.charOffset);
if (name is ParserRecovery || mixinApplication is ParserRecovery) {
- libraryBuilder.endNestedDeclaration(
- TypeParameterScopeKind.namedMixinApplication, "<syntax-error>");
+ libraryBuilder
+ .endNestedDeclaration(
+ TypeParameterScopeKind.namedMixinApplication, "<syntax-error>")
+ .resolveTypes(typeVariables, libraryBuilder);
return;
}
@@ -1650,8 +1656,10 @@
// `library.addFunctionType`.
if (name is ParserRecovery) {
pop(); // Metadata.
- libraryBuilder.endNestedDeclaration(
- TypeParameterScopeKind.typedef, "<syntax-error>");
+ libraryBuilder
+ .endNestedDeclaration(
+ TypeParameterScopeKind.typedef, "<syntax-error>")
+ .resolveTypes(typeVariables, libraryBuilder);
return;
}
libraryBuilder.beginNestedDeclaration(
@@ -1667,8 +1675,10 @@
name = pop();
if (name is ParserRecovery) {
pop(); // Metadata.
- libraryBuilder.endNestedDeclaration(
- TypeParameterScopeKind.functionType, "<syntax-error>");
+ libraryBuilder
+ .endNestedDeclaration(
+ TypeParameterScopeKind.functionType, "<syntax-error>")
+ .resolveTypes(typeVariables, libraryBuilder);
return;
}
if (type is FunctionTypeBuilder &&
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 51d4375..d13a474 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -188,6 +188,9 @@
final List<TypeVariableBuilder> boundlessTypeVariables =
<TypeVariableBuilder>[];
+ final List<UncheckedTypedefType> uncheckedTypedefTypes =
+ <UncheckedTypedefType>[];
+
// A list of alternating forwarders and the procedures they were generated
// for. Note that it may not include a forwarder-origin pair in cases when
// the former does not need to be updated after the body of the latter was
@@ -3778,6 +3781,7 @@
}
}
inferredTypes.clear();
+ checkUncheckedTypedefTypes(typeEnvironment);
}
void registerImplicitlyTypedField(FieldBuilder fieldBuilder) {
@@ -3829,6 +3833,21 @@
_pendingNullabilities
.add(new PendingNullability(fileUri, charOffset, type));
}
+
+ /// Performs delayed bounds checks on [TypedefType]s for the library
+ ///
+ /// As [TypedefType]s are built, they are eagerly unaliased, making it
+ /// impossible to perform the bounds checks on them at the time when the
+ /// checks can be done. To perform the checks, [TypedefType]s are added to
+ /// [uncheckedTypedefTypes] as they are built. This method performs the
+ /// checks and clears the list of the types for the delayed check.
+ void checkUncheckedTypedefTypes(TypeEnvironment typeEnvironment) {
+ for (UncheckedTypedefType uncheckedTypedefType in uncheckedTypedefTypes) {
+ checkBoundsInType(uncheckedTypedefType.typeToCheck, typeEnvironment,
+ uncheckedTypedefType.fileUri, uncheckedTypedefType.offset);
+ }
+ uncheckedTypedefTypes.clear();
+ }
}
// The kind of type parameter scope built by a [TypeParameterScopeBuilder]
@@ -4295,3 +4314,14 @@
PendingNullability(this.fileUri, this.charOffset, this.type);
}
+
+class UncheckedTypedefType {
+ final TypedefType typeToCheck;
+
+ // TODO(dmitryas): Make these fields nullable when the library is opted-in to
+ // NNBD.
+ int offset;
+ Uri fileUri;
+
+ UncheckedTypedefType(this.typeToCheck);
+}
diff --git a/pkg/front_end/test/spell_checking_list_common.txt b/pkg/front_end/test/spell_checking_list_common.txt
index 7d290ee..912054f 100644
--- a/pkg/front_end/test/spell_checking_list_common.txt
+++ b/pkg/front_end/test/spell_checking_list_common.txt
@@ -3155,6 +3155,7 @@
unbind
uncertain
unchanged
+unchecked
unclaimed
unclear
undeclared
diff --git a/pkg/front_end/test/spell_checking_list_tests.txt b/pkg/front_end/test/spell_checking_list_tests.txt
index f2aa65a..8050222 100644
--- a/pkg/front_end/test/spell_checking_list_tests.txt
+++ b/pkg/front_end/test/spell_checking_list_tests.txt
@@ -57,6 +57,12 @@
bail
bailing
bailout
+bar1a
+bar1b
+bar2a
+bar2b
+bar3a
+bar3b
barbar
bash
bat
diff --git a/pkg/front_end/testcases/general/issue45490.dart b/pkg/front_end/testcases/general/issue45490.dart
new file mode 100644
index 0000000..dee548d
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue45490.dart
@@ -0,0 +1,9 @@
+// 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 A<X> {}
+
+class test<X extends A> = A<X extends A<X>>;
+
+main() {}
diff --git a/pkg/front_end/testcases/general/issue45490.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue45490.dart.textual_outline.expect
new file mode 100644
index 0000000..cf841d6
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue45490.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+class A<X> {}
+class test<X extends A> = A<X extends A<X>>with;
+main() {}
diff --git a/pkg/front_end/testcases/general/issue45490.dart.weak.expect b/pkg/front_end/testcases/general/issue45490.dart.weak.expect
new file mode 100644
index 0000000..4ebc700
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue45490.dart.weak.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue45490.dart:7:29: Error: Expected '>' after this.
+// class test<X extends A> = A<X extends A<X>>;
+// ^
+//
+// pkg/front_end/testcases/general/issue45490.dart:7:44: Error: Expected 'with' before this.
+// class test<X extends A> = A<X extends A<X>>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/issue45490.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue45490.dart.weak.outline.expect
new file mode 100644
index 0000000..349a6cb
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue45490.dart.weak.outline.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue45490.dart:7:29: Error: Expected '>' after this.
+// class test<X extends A> = A<X extends A<X>>;
+// ^
+//
+// pkg/front_end/testcases/general/issue45490.dart:7:44: Error: Expected 'with' before this.
+// class test<X extends A> = A<X extends A<X>>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ ;
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/general/issue45490.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue45490.dart.weak.transformed.expect
new file mode 100644
index 0000000..4ebc700
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue45490.dart.weak.transformed.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue45490.dart:7:29: Error: Expected '>' after this.
+// class test<X extends A> = A<X extends A<X>>;
+// ^
+//
+// pkg/front_end/testcases/general/issue45490.dart:7:44: Error: Expected 'with' before this.
+// class test<X extends A> = A<X extends A<X>>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart
new file mode 100644
index 0000000..84f5324
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart
@@ -0,0 +1,38 @@
+// 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 A<T> {}
+
+typedef B<X extends A<X>> = A<X>;
+
+foo() {
+ B<A<int>> x1;
+ A<B<A<int>>> x2;
+}
+
+B<A<int>> bar1a() => throw 42;
+A<B<A<int>>> bar1b() => throw 42;
+
+bar2a(B<A<int>> x) => throw 42;
+bar2b(A<B<A<int>>> x) => throw 42;
+
+bar3a<X extends B<A<int>>>() => throw 42;
+bar3b<X extends A<B<A<int>>>>() => throw 42;
+
+class Bar1<X extends B<A<int>>> {
+ B<A<int>> barBar11() => throw 42;
+ barBar12(B<A<int>> x) => throw 42;
+ barBar13<X extends B<A<int>>>() => throw 42;
+}
+
+class Bar2<X extends A<B<A<int>>>> {
+ A<B<A<int>>> barBar21() => throw 42;
+ barBar22(A<B<A<int>>> x) => throw 42;
+ barBar23<X extends A<B<A<int>>>>() => throw 42;
+}
+
+typedef Baz1 = B<A<int>>;
+typedef Baz2 = A<B<A<int>>>;
+
+main() {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.strong.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.strong.expect
new file mode 100644
index 0000000..7506643
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.strong.expect
@@ -0,0 +1,216 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:20:17: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar3a<X extends B<A<int>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:21:19: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar3b<X extends A<B<A<int>>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:23:22: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// class Bar1<X extends B<A<int>>> {
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:26:22: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar13<X extends B<A<int>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:29:24: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// class Bar2<X extends A<B<A<int>>>> {
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:32:24: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar23<X extends A<B<A<int>>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:14:1: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> bar1a() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:15:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> bar1b() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:17:7: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar2a(B<A<int>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:18:9: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar2b(A<B<A<int>>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:24:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> barBar11() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:25:12: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar12(B<A<int>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:30:5: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> barBar21() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:31:14: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar22(A<B<A<int>>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:35:16: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef Baz1 = B<A<int>>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:36:18: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef Baz2 = A<B<A<int>>>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:10:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> x1;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:11:5: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> x2;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends A<X>> = A<X>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef B<X extends self::A<X> = self::A<dynamic>> = self::A<X>;
+typedef Baz1 = self::A<self::A<core::int>>;
+typedef Baz2 = self::A<self::A<self::A<core::int>>>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ : super core::Object::•()
+ ;
+}
+class Bar1<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>> extends core::Object {
+ synthetic constructor •() → self::Bar1<self::Bar1::X>
+ : super core::Object::•()
+ ;
+ method barBar11() → self::A<self::A<core::int>>
+ return throw 42;
+ method barBar12(self::A<self::A<core::int>> x) → dynamic
+ return throw 42;
+ method barBar13<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>>() → dynamic
+ return throw 42;
+}
+class Bar2<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>> extends core::Object {
+ synthetic constructor •() → self::Bar2<self::Bar2::X>
+ : super core::Object::•()
+ ;
+ method barBar21() → self::A<self::A<self::A<core::int>>>
+ return throw 42;
+ method barBar22(self::A<self::A<self::A<core::int>>> x) → dynamic
+ return throw 42;
+ method barBar23<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>>() → dynamic
+ return throw 42;
+}
+static method foo() → dynamic {
+ self::A<self::A<core::int>> x1;
+ self::A<self::A<self::A<core::int>>> x2;
+}
+static method bar1a() → self::A<self::A<core::int>>
+ return throw 42;
+static method bar1b() → self::A<self::A<self::A<core::int>>>
+ return throw 42;
+static method bar2a(self::A<self::A<core::int>> x) → dynamic
+ return throw 42;
+static method bar2b(self::A<self::A<self::A<core::int>>> x) → dynamic
+ return throw 42;
+static method bar3a<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>>() → dynamic
+ return throw 42;
+static method bar3b<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>>() → dynamic
+ return throw 42;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.strong.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.strong.transformed.expect
new file mode 100644
index 0000000..7506643
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.strong.transformed.expect
@@ -0,0 +1,216 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:20:17: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar3a<X extends B<A<int>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:21:19: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar3b<X extends A<B<A<int>>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:23:22: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// class Bar1<X extends B<A<int>>> {
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:26:22: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar13<X extends B<A<int>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:29:24: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// class Bar2<X extends A<B<A<int>>>> {
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:32:24: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar23<X extends A<B<A<int>>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:14:1: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> bar1a() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:15:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> bar1b() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:17:7: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar2a(B<A<int>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:18:9: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar2b(A<B<A<int>>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:24:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> barBar11() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:25:12: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar12(B<A<int>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:30:5: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> barBar21() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:31:14: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar22(A<B<A<int>>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:35:16: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef Baz1 = B<A<int>>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:36:18: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef Baz2 = A<B<A<int>>>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:10:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> x1;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:11:5: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> x2;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends A<X>> = A<X>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef B<X extends self::A<X> = self::A<dynamic>> = self::A<X>;
+typedef Baz1 = self::A<self::A<core::int>>;
+typedef Baz2 = self::A<self::A<self::A<core::int>>>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ : super core::Object::•()
+ ;
+}
+class Bar1<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>> extends core::Object {
+ synthetic constructor •() → self::Bar1<self::Bar1::X>
+ : super core::Object::•()
+ ;
+ method barBar11() → self::A<self::A<core::int>>
+ return throw 42;
+ method barBar12(self::A<self::A<core::int>> x) → dynamic
+ return throw 42;
+ method barBar13<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>>() → dynamic
+ return throw 42;
+}
+class Bar2<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>> extends core::Object {
+ synthetic constructor •() → self::Bar2<self::Bar2::X>
+ : super core::Object::•()
+ ;
+ method barBar21() → self::A<self::A<self::A<core::int>>>
+ return throw 42;
+ method barBar22(self::A<self::A<self::A<core::int>>> x) → dynamic
+ return throw 42;
+ method barBar23<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>>() → dynamic
+ return throw 42;
+}
+static method foo() → dynamic {
+ self::A<self::A<core::int>> x1;
+ self::A<self::A<self::A<core::int>>> x2;
+}
+static method bar1a() → self::A<self::A<core::int>>
+ return throw 42;
+static method bar1b() → self::A<self::A<self::A<core::int>>>
+ return throw 42;
+static method bar2a(self::A<self::A<core::int>> x) → dynamic
+ return throw 42;
+static method bar2b(self::A<self::A<self::A<core::int>>> x) → dynamic
+ return throw 42;
+static method bar3a<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>>() → dynamic
+ return throw 42;
+static method bar3b<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>>() → dynamic
+ return throw 42;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.textual_outline.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.textual_outline.expect
new file mode 100644
index 0000000..2836a16
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.textual_outline.expect
@@ -0,0 +1,22 @@
+class A<T> {}
+typedef B<X extends A<X>> = A<X>;
+foo() {}
+B<A<int>> bar1a() => throw 42;
+A<B<A<int>>> bar1b() => throw 42;
+bar2a(B<A<int>> x) => throw 42;
+bar2b(A<B<A<int>>> x) => throw 42;
+bar3a<X extends B<A<int>>>() => throw 42;
+bar3b<X extends A<B<A<int>>>>() => throw 42;
+class Bar1<X extends B<A<int>>> {
+ B<A<int>> barBar11() => throw 42;
+ barBar12(B<A<int>> x) => throw 42;
+ barBar13<X extends B<A<int>>>() => throw 42;
+}
+class Bar2<X extends A<B<A<int>>>> {
+ A<B<A<int>>> barBar21() => throw 42;
+ barBar22(A<B<A<int>>> x) => throw 42;
+ barBar23<X extends A<B<A<int>>>>() => throw 42;
+}
+typedef Baz1 = B<A<int>>;
+typedef Baz2 = A<B<A<int>>>;
+main() {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.weak.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.weak.expect
new file mode 100644
index 0000000..7506643
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.weak.expect
@@ -0,0 +1,216 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:20:17: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar3a<X extends B<A<int>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:21:19: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar3b<X extends A<B<A<int>>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:23:22: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// class Bar1<X extends B<A<int>>> {
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:26:22: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar13<X extends B<A<int>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:29:24: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// class Bar2<X extends A<B<A<int>>>> {
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:32:24: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar23<X extends A<B<A<int>>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:14:1: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> bar1a() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:15:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> bar1b() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:17:7: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar2a(B<A<int>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:18:9: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar2b(A<B<A<int>>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:24:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> barBar11() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:25:12: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar12(B<A<int>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:30:5: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> barBar21() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:31:14: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar22(A<B<A<int>>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:35:16: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef Baz1 = B<A<int>>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:36:18: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef Baz2 = A<B<A<int>>>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:10:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> x1;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:11:5: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> x2;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends A<X>> = A<X>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef B<X extends self::A<X> = self::A<dynamic>> = self::A<X>;
+typedef Baz1 = self::A<self::A<core::int>>;
+typedef Baz2 = self::A<self::A<self::A<core::int>>>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ : super core::Object::•()
+ ;
+}
+class Bar1<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>> extends core::Object {
+ synthetic constructor •() → self::Bar1<self::Bar1::X>
+ : super core::Object::•()
+ ;
+ method barBar11() → self::A<self::A<core::int>>
+ return throw 42;
+ method barBar12(self::A<self::A<core::int>> x) → dynamic
+ return throw 42;
+ method barBar13<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>>() → dynamic
+ return throw 42;
+}
+class Bar2<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>> extends core::Object {
+ synthetic constructor •() → self::Bar2<self::Bar2::X>
+ : super core::Object::•()
+ ;
+ method barBar21() → self::A<self::A<self::A<core::int>>>
+ return throw 42;
+ method barBar22(self::A<self::A<self::A<core::int>>> x) → dynamic
+ return throw 42;
+ method barBar23<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>>() → dynamic
+ return throw 42;
+}
+static method foo() → dynamic {
+ self::A<self::A<core::int>> x1;
+ self::A<self::A<self::A<core::int>>> x2;
+}
+static method bar1a() → self::A<self::A<core::int>>
+ return throw 42;
+static method bar1b() → self::A<self::A<self::A<core::int>>>
+ return throw 42;
+static method bar2a(self::A<self::A<core::int>> x) → dynamic
+ return throw 42;
+static method bar2b(self::A<self::A<self::A<core::int>>> x) → dynamic
+ return throw 42;
+static method bar3a<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>>() → dynamic
+ return throw 42;
+static method bar3b<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>>() → dynamic
+ return throw 42;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.weak.outline.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.weak.outline.expect
new file mode 100644
index 0000000..e66dde1
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.weak.outline.expect
@@ -0,0 +1,194 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:20:17: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar3a<X extends B<A<int>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:21:19: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar3b<X extends A<B<A<int>>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:23:22: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// class Bar1<X extends B<A<int>>> {
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:26:22: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar13<X extends B<A<int>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:29:24: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// class Bar2<X extends A<B<A<int>>>> {
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:32:24: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar23<X extends A<B<A<int>>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:14:1: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> bar1a() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:15:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> bar1b() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:17:7: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar2a(B<A<int>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:18:9: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar2b(A<B<A<int>>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:24:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> barBar11() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:25:12: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar12(B<A<int>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:30:5: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> barBar21() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:31:14: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar22(A<B<A<int>>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:35:16: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef Baz1 = B<A<int>>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:36:18: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef Baz2 = A<B<A<int>>>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends A<X>> = A<X>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef B<X extends self::A<X> = self::A<dynamic>> = self::A<X>;
+typedef Baz1 = self::A<self::A<core::int>>;
+typedef Baz2 = self::A<self::A<self::A<core::int>>>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ ;
+}
+class Bar1<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>> extends core::Object {
+ synthetic constructor •() → self::Bar1<self::Bar1::X>
+ ;
+ method barBar11() → self::A<self::A<core::int>>
+ ;
+ method barBar12(self::A<self::A<core::int>> x) → dynamic
+ ;
+ method barBar13<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>>() → dynamic
+ ;
+}
+class Bar2<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>> extends core::Object {
+ synthetic constructor •() → self::Bar2<self::Bar2::X>
+ ;
+ method barBar21() → self::A<self::A<self::A<core::int>>>
+ ;
+ method barBar22(self::A<self::A<self::A<core::int>>> x) → dynamic
+ ;
+ method barBar23<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>>() → dynamic
+ ;
+}
+static method foo() → dynamic
+ ;
+static method bar1a() → self::A<self::A<core::int>>
+ ;
+static method bar1b() → self::A<self::A<self::A<core::int>>>
+ ;
+static method bar2a(self::A<self::A<core::int>> x) → dynamic
+ ;
+static method bar2b(self::A<self::A<self::A<core::int>>> x) → dynamic
+ ;
+static method bar3a<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>>() → dynamic
+ ;
+static method bar3b<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>>() → dynamic
+ ;
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.weak.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.weak.transformed.expect
new file mode 100644
index 0000000..7506643
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart.weak.transformed.expect
@@ -0,0 +1,216 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:20:17: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar3a<X extends B<A<int>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:21:19: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar3b<X extends A<B<A<int>>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:23:22: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// class Bar1<X extends B<A<int>>> {
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:26:22: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar13<X extends B<A<int>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:29:24: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// class Bar2<X extends A<B<A<int>>>> {
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:32:24: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar23<X extends A<B<A<int>>>>() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:14:1: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> bar1a() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:15:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> bar1b() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:17:7: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar2a(B<A<int>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:18:9: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// bar2b(A<B<A<int>>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:24:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> barBar11() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:25:12: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar12(B<A<int>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:30:5: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> barBar21() => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:31:14: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// barBar22(A<B<A<int>>> x) => throw 42;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:35:16: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef Baz1 = B<A<int>>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:36:18: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef Baz2 = A<B<A<int>>>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:10:3: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// B<A<int>> x1;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7: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/aliased_checks.dart:11:5: Error: Type argument 'A<int>' 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/aliased_checks.dart'.
+// Try changing type arguments so that they conform to the bounds.
+// A<B<A<int>>> x2;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks.dart:7:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends A<X>> = A<X>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef B<X extends self::A<X> = self::A<dynamic>> = self::A<X>;
+typedef Baz1 = self::A<self::A<core::int>>;
+typedef Baz2 = self::A<self::A<self::A<core::int>>>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ : super core::Object::•()
+ ;
+}
+class Bar1<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>> extends core::Object {
+ synthetic constructor •() → self::Bar1<self::Bar1::X>
+ : super core::Object::•()
+ ;
+ method barBar11() → self::A<self::A<core::int>>
+ return throw 42;
+ method barBar12(self::A<self::A<core::int>> x) → dynamic
+ return throw 42;
+ method barBar13<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>>() → dynamic
+ return throw 42;
+}
+class Bar2<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>> extends core::Object {
+ synthetic constructor •() → self::Bar2<self::Bar2::X>
+ : super core::Object::•()
+ ;
+ method barBar21() → self::A<self::A<self::A<core::int>>>
+ return throw 42;
+ method barBar22(self::A<self::A<self::A<core::int>>> x) → dynamic
+ return throw 42;
+ method barBar23<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>>() → dynamic
+ return throw 42;
+}
+static method foo() → dynamic {
+ self::A<self::A<core::int>> x1;
+ self::A<self::A<self::A<core::int>>> x2;
+}
+static method bar1a() → self::A<self::A<core::int>>
+ return throw 42;
+static method bar1b() → self::A<self::A<self::A<core::int>>>
+ return throw 42;
+static method bar2a(self::A<self::A<core::int>> x) → dynamic
+ return throw 42;
+static method bar2b(self::A<self::A<self::A<core::int>>> x) → dynamic
+ return throw 42;
+static method bar3a<X extends self::A<self::A<core::int>> = self::A<self::A<core::int>>>() → dynamic
+ return throw 42;
+static method bar3b<X extends self::A<self::A<self::A<core::int>>> = self::A<self::A<self::A<core::int>>>>() → dynamic
+ return throw 42;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart
new file mode 100644
index 0000000..1317c74
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart
@@ -0,0 +1,13 @@
+// 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.
+
+foo() {
+ A<String> a;
+}
+
+typedef A<X extends int> = B<String>;
+typedef B<X extends int> = C<String>;
+typedef C<X extends int> = X;
+
+main() {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.strong.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.strong.expect
new file mode 100644
index 0000000..2b7816b
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.strong.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:10:28: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'C'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef B<X extends int> = C<String>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:11:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef C<X extends int> = X;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:9:28: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'B'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef A<X extends int> = B<String>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends int> = C<String>;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:6:3: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'A'.
+// Try changing type arguments so that they conform to the bounds.
+// A<String> a;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:9:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef A<X extends int> = B<String>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef A<unrelated X extends core::int = core::int> = core::String;
+typedef B<unrelated X extends core::int = core::int> = core::String;
+typedef C<X extends core::int = core::int> = X;
+static method foo() → dynamic {
+ core::String a;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.strong.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.strong.transformed.expect
new file mode 100644
index 0000000..2b7816b
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.strong.transformed.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:10:28: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'C'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef B<X extends int> = C<String>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:11:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef C<X extends int> = X;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:9:28: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'B'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef A<X extends int> = B<String>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends int> = C<String>;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:6:3: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'A'.
+// Try changing type arguments so that they conform to the bounds.
+// A<String> a;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:9:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef A<X extends int> = B<String>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef A<unrelated X extends core::int = core::int> = core::String;
+typedef B<unrelated X extends core::int = core::int> = core::String;
+typedef C<X extends core::int = core::int> = X;
+static method foo() → dynamic {
+ core::String a;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.textual_outline.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.textual_outline.expect
new file mode 100644
index 0000000..ebe8a0b
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+foo() {}
+typedef A<X extends int> = B<String>;
+typedef B<X extends int> = C<String>;
+typedef C<X extends int> = X;
+main() {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.weak.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.weak.expect
new file mode 100644
index 0000000..2b7816b
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.weak.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:10:28: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'C'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef B<X extends int> = C<String>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:11:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef C<X extends int> = X;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:9:28: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'B'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef A<X extends int> = B<String>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends int> = C<String>;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:6:3: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'A'.
+// Try changing type arguments so that they conform to the bounds.
+// A<String> a;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:9:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef A<X extends int> = B<String>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef A<unrelated X extends core::int = core::int> = core::String;
+typedef B<unrelated X extends core::int = core::int> = core::String;
+typedef C<X extends core::int = core::int> = X;
+static method foo() → dynamic {
+ core::String a;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.weak.outline.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.weak.outline.expect
new file mode 100644
index 0000000..0649b07
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.weak.outline.expect
@@ -0,0 +1,30 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:10:28: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'C'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef B<X extends int> = C<String>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:11:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef C<X extends int> = X;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:9:28: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'B'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef A<X extends int> = B<String>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends int> = C<String>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef A<unrelated X extends core::int = core::int> = core::String;
+typedef B<unrelated X extends core::int = core::int> = core::String;
+typedef C<X extends core::int = core::int> = X;
+static method foo() → dynamic
+ ;
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.weak.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.weak.transformed.expect
new file mode 100644
index 0000000..2b7816b
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart.weak.transformed.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:10:28: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'C'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef B<X extends int> = C<String>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:11:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef C<X extends int> = X;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:9:28: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'B'.
+// Try changing type arguments so that they conform to the bounds.
+// typedef A<X extends int> = B<String>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:10:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends int> = C<String>;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:6:3: Error: Type argument 'String' doesn't conform to the bound 'int' of the type variable 'X' on 'A'.
+// Try changing type arguments so that they conform to the bounds.
+// A<String> a;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_in_typedef.dart:9:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef A<X extends int> = B<String>;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef A<unrelated X extends core::int = core::int> = core::String;
+typedef B<unrelated X extends core::int = core::int> = core::String;
+typedef C<X extends core::int = core::int> = X;
+static method foo() → dynamic {
+ core::String a;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart
new file mode 100644
index 0000000..e08489b
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart
@@ -0,0 +1,9 @@
+// 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 A {}
+
+typedef B<X extends String> = A;
+
+class C<Y extends B<int>> {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart
new file mode 100644
index 0000000..0123a2a
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart
@@ -0,0 +1,7 @@
+// 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.
+
+import './aliased_checks_no_bodies_lib.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.strong.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.strong.expect
new file mode 100644
index 0000000..381925d
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.strong.expect
@@ -0,0 +1,33 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///aliased_checks_no_bodies_lib.dart";
+
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart:9:19: Error: Type argument 'int' doesn't conform to the bound 'String' of the type variable 'X' on 'B'.
+// Try changing type arguments so that they conform to the bounds.
+// class C<Y extends B<int>> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart:7:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends String> = A;
+// ^
+//
+import self as self2;
+import "dart:core" as core;
+
+typedef B<unrelated X extends core::String = core::String> = self2::A;
+class A extends core::Object {
+ synthetic constructor •() → self2::A
+ : super core::Object::•()
+ ;
+}
+class C<Y extends self2::A = self2::A> extends core::Object {
+ synthetic constructor •() → self2::C<self2::C::Y>
+ : super core::Object::•()
+ ;
+}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.strong.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.strong.transformed.expect
new file mode 100644
index 0000000..381925d
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.strong.transformed.expect
@@ -0,0 +1,33 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///aliased_checks_no_bodies_lib.dart";
+
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart:9:19: Error: Type argument 'int' doesn't conform to the bound 'String' of the type variable 'X' on 'B'.
+// Try changing type arguments so that they conform to the bounds.
+// class C<Y extends B<int>> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart:7:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends String> = A;
+// ^
+//
+import self as self2;
+import "dart:core" as core;
+
+typedef B<unrelated X extends core::String = core::String> = self2::A;
+class A extends core::Object {
+ synthetic constructor •() → self2::A
+ : super core::Object::•()
+ ;
+}
+class C<Y extends self2::A = self2::A> extends core::Object {
+ synthetic constructor •() → self2::C<self2::C::Y>
+ : super core::Object::•()
+ ;
+}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.textual_outline.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.textual_outline.expect
new file mode 100644
index 0000000..ac7da8d
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+import './aliased_checks_no_bodies_lib.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..ac7da8d
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+import './aliased_checks_no_bodies_lib.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.weak.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.weak.expect
new file mode 100644
index 0000000..381925d
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.weak.expect
@@ -0,0 +1,33 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///aliased_checks_no_bodies_lib.dart";
+
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart:9:19: Error: Type argument 'int' doesn't conform to the bound 'String' of the type variable 'X' on 'B'.
+// Try changing type arguments so that they conform to the bounds.
+// class C<Y extends B<int>> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart:7:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends String> = A;
+// ^
+//
+import self as self2;
+import "dart:core" as core;
+
+typedef B<unrelated X extends core::String = core::String> = self2::A;
+class A extends core::Object {
+ synthetic constructor •() → self2::A
+ : super core::Object::•()
+ ;
+}
+class C<Y extends self2::A = self2::A> extends core::Object {
+ synthetic constructor •() → self2::C<self2::C::Y>
+ : super core::Object::•()
+ ;
+}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.weak.outline.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.weak.outline.expect
new file mode 100644
index 0000000..ecbd101
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.weak.outline.expect
@@ -0,0 +1,32 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///aliased_checks_no_bodies_lib.dart";
+
+static method main() → dynamic
+ ;
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart:9:19: Error: Type argument 'int' doesn't conform to the bound 'String' of the type variable 'X' on 'B'.
+// Try changing type arguments so that they conform to the bounds.
+// class C<Y extends B<int>> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart:7:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends String> = A;
+// ^
+//
+import self as self2;
+import "dart:core" as core;
+
+typedef B<unrelated X extends core::String = core::String> = self2::A;
+class A extends core::Object {
+ synthetic constructor •() → self2::A
+ ;
+}
+class C<Y extends self2::A = self2::A> extends core::Object {
+ synthetic constructor •() → self2::C<self2::C::Y>
+ ;
+}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.weak.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.weak.transformed.expect
new file mode 100644
index 0000000..381925d
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_main.dart.weak.transformed.expect
@@ -0,0 +1,33 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///aliased_checks_no_bodies_lib.dart";
+
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart:9:19: Error: Type argument 'int' doesn't conform to the bound 'String' of the type variable 'X' on 'B'.
+// Try changing type arguments so that they conform to the bounds.
+// class C<Y extends B<int>> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/aliased_checks_no_bodies_lib.dart:7:11: Context: This is the type variable whose bound isn't conformed to.
+// typedef B<X extends String> = A;
+// ^
+//
+import self as self2;
+import "dart:core" as core;
+
+typedef B<unrelated X extends core::String = core::String> = self2::A;
+class A extends core::Object {
+ synthetic constructor •() → self2::A
+ : super core::Object::•()
+ ;
+}
+class C<Y extends self2::A = self2::A> extends core::Object {
+ synthetic constructor •() → self2::C<self2::C::Y>
+ : super core::Object::•()
+ ;
+}
diff --git a/pkg/front_end/testcases/textual_outline.status b/pkg/front_end/testcases/textual_outline.status
index 66bc9f8..b30bc2c 100644
--- a/pkg/front_end/testcases/textual_outline.status
+++ b/pkg/front_end/testcases/textual_outline.status
@@ -59,6 +59,7 @@
general/invalid_operator: FormatterCrash
general/issue42997: FormatterCrash
general/issue43363: FormatterCrash
+general/issue45490: FormatterCrash
general/many_errors: FormatterCrash
general/null_safety_invalid_experiment: FormatterCrash
general/null_safety_invalid_experiment_and_language_version: FormatterCrash
@@ -126,6 +127,8 @@
nnbd_mixed/inheritance_from_opt_in: FormatterCrash
nnbd_mixed/issue41597: FormatterCrash
nnbd_mixed/null_safety_invalid_language_version: FormatterCrash
+nonfunction_type_aliases/aliased_checks: FormatterCrash
+nonfunction_type_aliases/aliased_checks_in_typedef: FormatterCrash
nonfunction_type_aliases/issue41501: FormatterCrash
nonfunction_type_aliases/issue42446: FormatterCrash
nonfunction_type_aliases/issue45051: FormatterCrash
diff --git a/tools/VERSION b/tools/VERSION
index 73e776b6..2abc5be 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 13
PATCH 0
-PRERELEASE 179
+PRERELEASE 180
PRERELEASE_PATCH 0
\ No newline at end of file