Version 2.13.0-186.0.dev
Merge commit '19ab1fd8006e76e9af7fe0b66934a7b4005cc52f' 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 1833d4f..31a334d 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
@@ -21,6 +21,8 @@
templateExtendingRestricted,
templateNotAType,
templateSupertypeIsIllegal,
+ templateSupertypeIsIllegalAliased,
+ templateSupertypeIsNullableAliased,
templateSupertypeIsTypeVariable,
templateTypeArgumentMismatch,
templateTypeArgumentsOnTypeVariable,
@@ -177,7 +179,7 @@
String get debugName => "NamedTypeBuilder";
StringBuffer printOn(StringBuffer buffer) {
- buffer.write(name);
+ buffer.write(flattenName(name, charOffset, fileUri));
if (arguments?.isEmpty ?? true) return buffer;
buffer.write("<");
bool first = true;
@@ -201,29 +203,39 @@
context: context);
}
- Supertype handleInvalidSupertype(LibraryBuilder library, int charOffset,
- Uri fileUri, TypeAliasBuilder aliasBuilder) {
+ Supertype handleInvalidSupertype(
+ LibraryBuilder library, int charOffset, Uri fileUri) {
Template<Message Function(String name)> template =
declaration.isTypeVariable
? templateSupertypeIsTypeVariable
: templateSupertypeIsIllegal;
- if (aliasBuilder != null) {
- library.addProblem(
- template.withArguments(flattenName(name, charOffset, fileUri)),
- charOffset,
- noLength,
- fileUri,
- context: [
- messageTypedefCause.withLocation(
- aliasBuilder.fileUri, aliasBuilder.charOffset, noLength),
- ]);
- } else {
- library.addProblem(
- template.withArguments(flattenName(name, charOffset, fileUri)),
- charOffset,
- noLength,
- fileUri);
- }
+ library.addProblem(template.withArguments(fullNameForErrors), charOffset,
+ noLength, fileUri);
+ return null;
+ }
+
+ Supertype handleInvalidAliasedSupertype(
+ LibraryBuilder library,
+ int charOffset,
+ Uri fileUri,
+ TypeAliasBuilder aliasBuilder,
+ DartType type) {
+ Template<Message Function(String name, DartType type, bool)> template =
+ declaration.isTypeVariable
+ ? templateSupertypeIsTypeVariable
+ : (type != null && type.nullability == Nullability.nullable
+ ? templateSupertypeIsNullableAliased
+ : templateSupertypeIsIllegalAliased);
+ library.addProblem(
+ template.withArguments(
+ fullNameForErrors, type, library.isNonNullableByDefault),
+ charOffset,
+ noLength,
+ fileUri,
+ context: [
+ messageTypedefCause.withLocation(
+ aliasBuilder.fileUri, aliasBuilder.charOffset, noLength),
+ ]);
return null;
}
@@ -266,7 +278,6 @@
Supertype buildSupertype(
LibraryBuilder library, int charOffset, Uri fileUri) {
TypeDeclarationBuilder declaration = this.declaration;
- TypeAliasBuilder aliasBuilder; // Non-null if a type alias is used.
if (declaration is ClassBuilder) {
if (declaration.isNullClass && !library.mayImplementRestrictedTypes) {
library.addProblem(
@@ -277,10 +288,10 @@
}
return declaration.buildSupertype(library, arguments);
} else if (declaration is TypeAliasBuilder) {
- aliasBuilder = declaration;
+ TypeAliasBuilder aliasBuilder = declaration;
DartType type =
declaration.buildType(library, library.nonNullableBuilder, arguments);
- if (type is InterfaceType) {
+ if (type is InterfaceType && type.nullability != Nullability.nullable) {
return new Supertype(type.classNode, type.typeArguments);
} else if (type is NullType) {
// Even though Null is disallowed as a supertype, ClassHierarchyBuilder
@@ -324,9 +335,9 @@
unaliasedDeclaration.name == "FutureOr");
return new Supertype((unaliasedDeclaration as ClassBuilder).cls,
<DartType>[type.typeArgument]);
- } else {
- // Do nothing: handleInvalidSuper below will handle the erroneous case.
}
+ return handleInvalidAliasedSupertype(
+ library, charOffset, fileUri, aliasBuilder, type);
} else if (declaration is InvalidTypeDeclarationBuilder) {
library.addProblem(
declaration.message.messageObject,
@@ -336,22 +347,23 @@
severity: Severity.error);
return null;
}
- return handleInvalidSupertype(library, charOffset, fileUri, aliasBuilder);
+ return handleInvalidSupertype(library, charOffset, fileUri);
}
Supertype buildMixedInType(
LibraryBuilder library, int charOffset, Uri fileUri) {
TypeDeclarationBuilder declaration = this.declaration;
- TypeAliasBuilder aliasBuilder; // Non-null if a type alias is used.
if (declaration is ClassBuilder) {
return declaration.buildMixedInType(library, arguments);
} else if (declaration is TypeAliasBuilder) {
- aliasBuilder = declaration;
+ TypeAliasBuilder aliasBuilder = declaration;
DartType type =
declaration.buildType(library, library.nonNullableBuilder, arguments);
- if (type is InterfaceType) {
+ if (type is InterfaceType && type.nullability != Nullability.nullable) {
return new Supertype(type.classNode, type.typeArguments);
}
+ return handleInvalidAliasedSupertype(
+ library, charOffset, fileUri, aliasBuilder, type);
} else if (declaration is InvalidTypeDeclarationBuilder) {
library.addProblem(
declaration.message.messageObject,
@@ -361,7 +373,7 @@
severity: Severity.error);
return null;
}
- return handleInvalidSupertype(library, charOffset, fileUri, aliasBuilder);
+ return handleInvalidSupertype(library, charOffset, fileUri);
}
TypeBuilder subst(Map<TypeVariableBuilder, TypeBuilder> substitution) {
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart b/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart
index 21f427c..4e0e710 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart
@@ -4631,6 +4631,78 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
Message Function(
+ String name, DartType _type, bool isNonNullableByDefault)>
+ templateSupertypeIsIllegalAliased = const Template<
+ Message Function(
+ String name, DartType _type, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#name' which is an alias of '#type' can't be used as supertype.""",
+ withArguments: _withArgumentsSupertypeIsIllegalAliased);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(
+ String name, DartType _type, bool isNonNullableByDefault)>
+ codeSupertypeIsIllegalAliased = const Code<
+ Message Function(
+ String name, DartType _type, bool isNonNullableByDefault)>(
+ "SupertypeIsIllegalAliased",
+ analyzerCodes: <String>["EXTENDS_NON_CLASS"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsSupertypeIsIllegalAliased(
+ String name, DartType _type, bool isNonNullableByDefault) {
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ String type = typeParts.join();
+ return new Message(codeSupertypeIsIllegalAliased,
+ message:
+ """The type '${name}' which is an alias of '${type}' can't be used as supertype.""" +
+ labeler.originMessages,
+ arguments: {'name': name, 'type': _type});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(
+ String name, DartType _type, bool isNonNullableByDefault)>
+ templateSupertypeIsNullableAliased = const Template<
+ Message Function(
+ String name, DartType _type, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#name' which is an alias of '#type' can't be used as supertype because it is nullable.""",
+ withArguments: _withArgumentsSupertypeIsNullableAliased);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(
+ String name, DartType _type, bool isNonNullableByDefault)>
+ codeSupertypeIsNullableAliased = const Code<
+ Message Function(
+ String name, DartType _type, bool isNonNullableByDefault)>(
+ "SupertypeIsNullableAliased",
+ analyzerCodes: <String>["EXTENDS_NON_CLASS"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsSupertypeIsNullableAliased(
+ String name, DartType _type, bool isNonNullableByDefault) {
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ String type = typeParts.join();
+ return new Message(codeSupertypeIsNullableAliased,
+ message:
+ """The type '${name}' which is an alias of '${type}' can't be used as supertype because it is nullable.""" +
+ labeler.originMessages,
+ arguments: {'name': name, 'type': _type});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(
DartType _type, DartType _type2, bool isNonNullableByDefault)>
templateSwitchExpressionNotAssignable = const Template<
Message Function(
diff --git a/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart b/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart
index f7d816c..e097eca 100644
--- a/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart
@@ -112,8 +112,8 @@
result.add(nameForEntity(
typedefNode,
typedefNode.name,
- typedefNode.enclosingLibrary.importUri,
- typedefNode.enclosingLibrary.fileUri));
+ typedefNode?.enclosingLibrary?.importUri ?? unknownUri,
+ typedefNode?.enclosingLibrary?.fileUri ?? unknownUri));
if (node.typeArguments.isNotEmpty) {
result.add("<");
bool first = true;
@@ -226,8 +226,10 @@
result.add(nameForEntity(
classNode,
classNode.name,
- classNode.enclosingLibrary.importUri,
- classNode.enclosingLibrary.fileUri));
+ // TODO(johnniwinther): Ensure enclosing libraries on classes earlier
+ // in the compiler to ensure types in error messages have context.
+ classNode?.enclosingLibrary?.importUri ?? unknownUri,
+ classNode?.enclosingLibrary?.fileUri ?? unknownUri));
if (node.typeArguments.isNotEmpty) {
result.add("<");
bool first = true;
@@ -252,8 +254,8 @@
result.add(nameForEntity(
node.extension,
node.extension.name,
- node.extension.enclosingLibrary.importUri,
- node.extension.enclosingLibrary.fileUri));
+ node.extension?.enclosingLibrary?.importUri ?? unknownUri,
+ node.extension?.enclosingLibrary?.fileUri ?? unknownUri));
if (node.typeArguments.isNotEmpty) {
result.add("<");
bool first = true;
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index d25dfc3..cebc0ac 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -745,6 +745,8 @@
SupertypeIsFunction/analyzerCode: Fail
SupertypeIsFunction/example: Fail
SupertypeIsIllegal/example: Fail
+SupertypeIsIllegalAliased/example: Fail
+SupertypeIsNullableAliased/example: Fail
SupertypeIsTypeVariable/example: Fail
SwitchCaseFallThrough/example: Fail
SwitchExpressionNotSubtype/analyzerCode: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index c5be3f5..9525c92 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -2952,6 +2952,14 @@
template: "The type '#name' can't be used as supertype."
analyzerCode: EXTENDS_NON_CLASS
+SupertypeIsIllegalAliased:
+ template: "The type '#name' which is an alias of '#type' can't be used as supertype."
+ analyzerCode: EXTENDS_NON_CLASS
+
+SupertypeIsNullableAliased:
+ template: "The type '#name' which is an alias of '#type' can't be used as supertype because it is nullable."
+ analyzerCode: EXTENDS_NON_CLASS
+
SupertypeIsTypeVariable:
template: "The type variable '#name' can't be used as supertype."
analyzerCode: EXTENDS_NON_CLASS
diff --git a/pkg/front_end/test/spell_checking_list_tests.txt b/pkg/front_end/test/spell_checking_list_tests.txt
index 8050222..17ee5f0 100644
--- a/pkg/front_end/test/spell_checking_list_tests.txt
+++ b/pkg/front_end/test/spell_checking_list_tests.txt
@@ -180,6 +180,8 @@
cursor
cuts
cx
+d1a
+d1b
dacoharkes
dadd
daemon
@@ -523,6 +525,8 @@
mx
mxn
mysdk
+n1a
+n1b
naively
naturally
negatable
diff --git a/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart b/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart
new file mode 100644
index 0000000..366c73b7
--- /dev/null
+++ b/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F = T Function<T, S>(T, S);
+
+class Class<A> {
+ method() {
+ const G = F;
+ print(F);
+ print(G);
+ }
+}
+
+main() {
+ new Class<int>().method();
+}
diff --git a/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.textual_outline.expect b/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.textual_outline.expect
new file mode 100644
index 0000000..244f23d
--- /dev/null
+++ b/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.textual_outline.expect
@@ -0,0 +1,7 @@
+typedef F = T Function<T, S>(T, S);
+
+class Class<A> {
+ method() {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb25297
--- /dev/null
+++ b/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+class Class<A> {
+ method() {}
+}
+
+main() {}
+typedef F = T Function<T, S>(T, S);
diff --git a/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.weak.expect b/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.weak.expect
new file mode 100644
index 0000000..542c883
--- /dev/null
+++ b/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.weak.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%) → T%;
+class Class<A extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::Class<self::Class::A%>
+ : super core::Object::•()
+ ;
+ method method() → dynamic {
+ core::print(#C1);
+ core::print(#C1);
+ }
+}
+static method main() → dynamic {
+ new self::Class::•<core::int>().{self::Class::method}();
+}
+
+constants {
+ #C1 = TypeLiteralConstant(<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T*, S*) →* T*)
+}
diff --git a/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.weak.outline.expect b/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.weak.outline.expect
new file mode 100644
index 0000000..6a9b7fb
--- /dev/null
+++ b/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.weak.outline.expect
@@ -0,0 +1,13 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%) → T%;
+class Class<A extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::Class<self::Class::A%>
+ ;
+ method method() → dynamic
+ ;
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.weak.transformed.expect b/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.weak.transformed.expect
new file mode 100644
index 0000000..542c883
--- /dev/null
+++ b/pkg/front_end/testcases/general/generic_typedef_in_generic_class.dart.weak.transformed.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%) → T%;
+class Class<A extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::Class<self::Class::A%>
+ : super core::Object::•()
+ ;
+ method method() → dynamic {
+ core::print(#C1);
+ core::print(#C1);
+ }
+}
+static method main() → dynamic {
+ new self::Class::•<core::int>().{self::Class::method}();
+}
+
+constants {
+ #C1 = TypeLiteralConstant(<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T*, S*) →* T*)
+}
diff --git a/pkg/front_end/testcases/general/qualified.dart.weak.expect b/pkg/front_end/testcases/general/qualified.dart.weak.expect
index a51969d..b829051 100644
--- a/pkg/front_end/testcases/general/qualified.dart.weak.expect
+++ b/pkg/front_end/testcases/general/qualified.dart.weak.expect
@@ -17,7 +17,7 @@
// lib.Missing method() {}
// ^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/qualified.dart:18:7: Error: The type 'lib.VoidFunction' can't be used as supertype.
+// pkg/front_end/testcases/general/qualified.dart:18:7: Error: The type 'lib.VoidFunction' which is an alias of 'void Function()' can't be used as supertype.
// class IllegalSupertype extends lib.VoidFunction {}
// ^
// pkg/front_end/testcases/general/qualified_lib.dart:27:9: Context: The issue arises via this type alias.
diff --git a/pkg/front_end/testcases/general/qualified.dart.weak.outline.expect b/pkg/front_end/testcases/general/qualified.dart.weak.outline.expect
index fcf8ecc..2102d04 100644
--- a/pkg/front_end/testcases/general/qualified.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/qualified.dart.weak.outline.expect
@@ -17,7 +17,7 @@
// lib.Missing method() {}
// ^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/qualified.dart:18:7: Error: The type 'lib.VoidFunction' can't be used as supertype.
+// pkg/front_end/testcases/general/qualified.dart:18:7: Error: The type 'lib.VoidFunction' which is an alias of 'void Function()' can't be used as supertype.
// class IllegalSupertype extends lib.VoidFunction {}
// ^
// pkg/front_end/testcases/general/qualified_lib.dart:27:9: Context: The issue arises via this type alias.
diff --git a/pkg/front_end/testcases/general/qualified.dart.weak.transformed.expect b/pkg/front_end/testcases/general/qualified.dart.weak.transformed.expect
index 25de173..003ca00 100644
--- a/pkg/front_end/testcases/general/qualified.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/qualified.dart.weak.transformed.expect
@@ -17,7 +17,7 @@
// lib.Missing method() {}
// ^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/qualified.dart:18:7: Error: The type 'lib.VoidFunction' can't be used as supertype.
+// pkg/front_end/testcases/general/qualified.dart:18:7: Error: The type 'lib.VoidFunction' which is an alias of 'void Function()' can't be used as supertype.
// class IllegalSupertype extends lib.VoidFunction {}
// ^
// pkg/front_end/testcases/general/qualified_lib.dart:27:9: Context: The issue arises via this type alias.
diff --git a/pkg/front_end/testcases/generic_metadata/from_dill/main.dart b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart
new file mode 100644
index 0000000..6ac6d2c
--- /dev/null
+++ b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart
@@ -0,0 +1,26 @@
+// 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 'main_lib.dart';
+
+main() {
+ C1 c1 = C1();
+ C1 c2 = C1<T Function<T>(T)>();
+
+ C2 c3 = C2();
+ C2 c4 = C2<void Function<int>()>();
+
+ C3 c5 = C3();
+ C3 c6 = C3<T Function<T>()>();
+
+ C4 c7 = C4();
+ C4 c8 = C4<void Function<T>(T)>();
+
+ C5 c9 = C5();
+ C5 c10 = C5<T Function<T extends S Function<S>(S)>(T)>();
+
+ C6 c11 = C6();
+ C6 c12 = C6<
+ T Function<T, S>(T, S, V Function<V extends S, U>(T, U, V, Map<S, U>))>();
+}
diff --git a/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.strong.expect b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.strong.expect
new file mode 100644
index 0000000..92b41bb
--- /dev/null
+++ b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.strong.expect
@@ -0,0 +1,81 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "main_lib.dart" as mai;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///main_lib.dart";
+
+static method main() → dynamic {
+ mai::C1<<T extends core::Object? = dynamic>(T%) → T%> c1 = new mai::C1::•<<T extends core::Object? = dynamic>(T%) → T%>();
+ mai::C1<<T extends core::Object? = dynamic>(T%) → T%> c2 = new mai::C1::•<<T extends core::Object? = dynamic>(T%) → T%>();
+ mai::C2<<T extends core::Object? = dynamic>() → void> c3 = new mai::C2::•<<T extends core::Object? = dynamic>() → void>();
+ mai::C2<<T extends core::Object? = dynamic>() → void> c4 = new mai::C2::•<<int extends core::Object? = dynamic>() → void>();
+ mai::C3<<T extends core::Object? = dynamic>() → T%> c5 = new mai::C3::•<<T extends core::Object? = dynamic>() → T%>();
+ mai::C3<<T extends core::Object? = dynamic>() → T%> c6 = new mai::C3::•<<T extends core::Object? = dynamic>() → T%>();
+ mai::C4<<T extends core::Object? = dynamic>(T%) → void> c7 = new mai::C4::•<<T extends core::Object? = dynamic>(T%) → void>();
+ mai::C4<<T extends core::Object? = dynamic>(T%) → void> c8 = new mai::C4::•<<T extends core::Object? = dynamic>(T%) → void>();
+ mai::C5<<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> c9 = new mai::C5::•<<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T>();
+ mai::C5<<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> c10 = new mai::C5::•<<T extends <S extends core::Object? = dynamic>(S%) → S% = <S extends core::Object? = dynamic>(S%) → S%>(T) → T>();
+ mai::C6<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> c11 = new mai::C6::•<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%>();
+ mai::C6<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> c12 = new mai::C6::•<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = S%, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%>();
+}
+
+library /*isNonNullableByDefault*/;
+import self as mai;
+import "dart:core" as core;
+
+typedef exp1 = <T extends core::Object? = dynamic>(T%) → T%;
+typedef exp2 = <T extends core::Object? = dynamic>() → void;
+typedef exp3 = <T extends core::Object? = dynamic>() → T%;
+typedef exp4 = <T extends core::Object? = dynamic>(T%) → void;
+typedef exp5 = <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T;
+typedef exp6 = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%;
+class C1<X extends <T extends core::Object? = dynamic>(T%) → T% = <T extends core::Object? = dynamic>(T%) → T%> extends core::Object {
+ constructor •() → mai::C1<mai::C1::X>
+ : super core::Object::•() {
+ mai::expect(#C1, mai::C1::X);
+ }
+}
+class C2<X extends <T extends core::Object? = dynamic>() → void = <T extends core::Object? = dynamic>() → void> extends core::Object {
+ constructor •() → mai::C2<mai::C2::X>
+ : super core::Object::•() {
+ mai::expect(#C2, mai::C2::X);
+ }
+}
+class C3<X extends <T extends core::Object? = dynamic>() → T% = <T extends core::Object? = dynamic>() → T%> extends core::Object {
+ constructor •() → mai::C3<mai::C3::X>
+ : super core::Object::•() {
+ mai::expect(#C3, mai::C3::X);
+ }
+}
+class C4<X extends <T extends core::Object? = dynamic>(T%) → void = <T extends core::Object? = dynamic>(T%) → void> extends core::Object {
+ constructor •() → mai::C4<mai::C4::X>
+ : super core::Object::•() {
+ mai::expect(#C4, mai::C4::X);
+ }
+}
+class C5<X extends <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T = <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> extends core::Object {
+ constructor •() → mai::C5<mai::C5::X>
+ : super core::Object::•() {
+ mai::expect(#C5, mai::C5::X);
+ }
+}
+class C6<X extends <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T% = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> extends core::Object {
+ constructor •() → mai::C6<mai::C6::X>
+ : super core::Object::•() {
+ mai::expect(#C6, mai::C6::X);
+ }
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+
+constants {
+ #C1 = TypeLiteralConstant(<T extends core::Object? = dynamic>(T%) → T%)
+ #C2 = TypeLiteralConstant(<T extends core::Object? = dynamic>() → void)
+ #C3 = TypeLiteralConstant(<T extends core::Object? = dynamic>() → T%)
+ #C4 = TypeLiteralConstant(<T extends core::Object? = dynamic>(T%) → void)
+ #C5 = TypeLiteralConstant(<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T)
+ #C6 = TypeLiteralConstant(<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%)
+}
diff --git a/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.strong.transformed.expect b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.strong.transformed.expect
new file mode 100644
index 0000000..92b41bb
--- /dev/null
+++ b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.strong.transformed.expect
@@ -0,0 +1,81 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "main_lib.dart" as mai;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///main_lib.dart";
+
+static method main() → dynamic {
+ mai::C1<<T extends core::Object? = dynamic>(T%) → T%> c1 = new mai::C1::•<<T extends core::Object? = dynamic>(T%) → T%>();
+ mai::C1<<T extends core::Object? = dynamic>(T%) → T%> c2 = new mai::C1::•<<T extends core::Object? = dynamic>(T%) → T%>();
+ mai::C2<<T extends core::Object? = dynamic>() → void> c3 = new mai::C2::•<<T extends core::Object? = dynamic>() → void>();
+ mai::C2<<T extends core::Object? = dynamic>() → void> c4 = new mai::C2::•<<int extends core::Object? = dynamic>() → void>();
+ mai::C3<<T extends core::Object? = dynamic>() → T%> c5 = new mai::C3::•<<T extends core::Object? = dynamic>() → T%>();
+ mai::C3<<T extends core::Object? = dynamic>() → T%> c6 = new mai::C3::•<<T extends core::Object? = dynamic>() → T%>();
+ mai::C4<<T extends core::Object? = dynamic>(T%) → void> c7 = new mai::C4::•<<T extends core::Object? = dynamic>(T%) → void>();
+ mai::C4<<T extends core::Object? = dynamic>(T%) → void> c8 = new mai::C4::•<<T extends core::Object? = dynamic>(T%) → void>();
+ mai::C5<<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> c9 = new mai::C5::•<<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T>();
+ mai::C5<<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> c10 = new mai::C5::•<<T extends <S extends core::Object? = dynamic>(S%) → S% = <S extends core::Object? = dynamic>(S%) → S%>(T) → T>();
+ mai::C6<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> c11 = new mai::C6::•<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%>();
+ mai::C6<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> c12 = new mai::C6::•<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = S%, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%>();
+}
+
+library /*isNonNullableByDefault*/;
+import self as mai;
+import "dart:core" as core;
+
+typedef exp1 = <T extends core::Object? = dynamic>(T%) → T%;
+typedef exp2 = <T extends core::Object? = dynamic>() → void;
+typedef exp3 = <T extends core::Object? = dynamic>() → T%;
+typedef exp4 = <T extends core::Object? = dynamic>(T%) → void;
+typedef exp5 = <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T;
+typedef exp6 = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%;
+class C1<X extends <T extends core::Object? = dynamic>(T%) → T% = <T extends core::Object? = dynamic>(T%) → T%> extends core::Object {
+ constructor •() → mai::C1<mai::C1::X>
+ : super core::Object::•() {
+ mai::expect(#C1, mai::C1::X);
+ }
+}
+class C2<X extends <T extends core::Object? = dynamic>() → void = <T extends core::Object? = dynamic>() → void> extends core::Object {
+ constructor •() → mai::C2<mai::C2::X>
+ : super core::Object::•() {
+ mai::expect(#C2, mai::C2::X);
+ }
+}
+class C3<X extends <T extends core::Object? = dynamic>() → T% = <T extends core::Object? = dynamic>() → T%> extends core::Object {
+ constructor •() → mai::C3<mai::C3::X>
+ : super core::Object::•() {
+ mai::expect(#C3, mai::C3::X);
+ }
+}
+class C4<X extends <T extends core::Object? = dynamic>(T%) → void = <T extends core::Object? = dynamic>(T%) → void> extends core::Object {
+ constructor •() → mai::C4<mai::C4::X>
+ : super core::Object::•() {
+ mai::expect(#C4, mai::C4::X);
+ }
+}
+class C5<X extends <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T = <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> extends core::Object {
+ constructor •() → mai::C5<mai::C5::X>
+ : super core::Object::•() {
+ mai::expect(#C5, mai::C5::X);
+ }
+}
+class C6<X extends <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T% = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> extends core::Object {
+ constructor •() → mai::C6<mai::C6::X>
+ : super core::Object::•() {
+ mai::expect(#C6, mai::C6::X);
+ }
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+
+constants {
+ #C1 = TypeLiteralConstant(<T extends core::Object? = dynamic>(T%) → T%)
+ #C2 = TypeLiteralConstant(<T extends core::Object? = dynamic>() → void)
+ #C3 = TypeLiteralConstant(<T extends core::Object? = dynamic>() → T%)
+ #C4 = TypeLiteralConstant(<T extends core::Object? = dynamic>(T%) → void)
+ #C5 = TypeLiteralConstant(<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T)
+ #C6 = TypeLiteralConstant(<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%)
+}
diff --git a/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.textual_outline.expect b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.textual_outline.expect
new file mode 100644
index 0000000..82be6bb
--- /dev/null
+++ b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+import 'main_lib.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..82be6bb
--- /dev/null
+++ b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+import 'main_lib.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.weak.expect b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.weak.expect
new file mode 100644
index 0000000..e1e7067
--- /dev/null
+++ b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.weak.expect
@@ -0,0 +1,81 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "main_lib.dart" as mai;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///main_lib.dart";
+
+static method main() → dynamic {
+ mai::C1<<T extends core::Object? = dynamic>(T%) → T%> c1 = new mai::C1::•<<T extends core::Object? = dynamic>(T%) → T%>();
+ mai::C1<<T extends core::Object? = dynamic>(T%) → T%> c2 = new mai::C1::•<<T extends core::Object? = dynamic>(T%) → T%>();
+ mai::C2<<T extends core::Object? = dynamic>() → void> c3 = new mai::C2::•<<T extends core::Object? = dynamic>() → void>();
+ mai::C2<<T extends core::Object? = dynamic>() → void> c4 = new mai::C2::•<<int extends core::Object? = dynamic>() → void>();
+ mai::C3<<T extends core::Object? = dynamic>() → T%> c5 = new mai::C3::•<<T extends core::Object? = dynamic>() → T%>();
+ mai::C3<<T extends core::Object? = dynamic>() → T%> c6 = new mai::C3::•<<T extends core::Object? = dynamic>() → T%>();
+ mai::C4<<T extends core::Object? = dynamic>(T%) → void> c7 = new mai::C4::•<<T extends core::Object? = dynamic>(T%) → void>();
+ mai::C4<<T extends core::Object? = dynamic>(T%) → void> c8 = new mai::C4::•<<T extends core::Object? = dynamic>(T%) → void>();
+ mai::C5<<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> c9 = new mai::C5::•<<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T>();
+ mai::C5<<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> c10 = new mai::C5::•<<T extends <S extends core::Object? = dynamic>(S%) → S% = <S extends core::Object? = dynamic>(S%) → S%>(T) → T>();
+ mai::C6<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> c11 = new mai::C6::•<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%>();
+ mai::C6<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> c12 = new mai::C6::•<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = S%, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%>();
+}
+
+library /*isNonNullableByDefault*/;
+import self as mai;
+import "dart:core" as core;
+
+typedef exp1 = <T extends core::Object? = dynamic>(T%) → T%;
+typedef exp2 = <T extends core::Object? = dynamic>() → void;
+typedef exp3 = <T extends core::Object? = dynamic>() → T%;
+typedef exp4 = <T extends core::Object? = dynamic>(T%) → void;
+typedef exp5 = <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T;
+typedef exp6 = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%;
+class C1<X extends <T extends core::Object? = dynamic>(T%) → T% = <T extends core::Object? = dynamic>(T%) → T%> extends core::Object {
+ constructor •() → mai::C1<mai::C1::X>
+ : super core::Object::•() {
+ mai::expect(#C1, mai::C1::X);
+ }
+}
+class C2<X extends <T extends core::Object? = dynamic>() → void = <T extends core::Object? = dynamic>() → void> extends core::Object {
+ constructor •() → mai::C2<mai::C2::X>
+ : super core::Object::•() {
+ mai::expect(#C2, mai::C2::X);
+ }
+}
+class C3<X extends <T extends core::Object? = dynamic>() → T% = <T extends core::Object? = dynamic>() → T%> extends core::Object {
+ constructor •() → mai::C3<mai::C3::X>
+ : super core::Object::•() {
+ mai::expect(#C3, mai::C3::X);
+ }
+}
+class C4<X extends <T extends core::Object? = dynamic>(T%) → void = <T extends core::Object? = dynamic>(T%) → void> extends core::Object {
+ constructor •() → mai::C4<mai::C4::X>
+ : super core::Object::•() {
+ mai::expect(#C4, mai::C4::X);
+ }
+}
+class C5<X extends <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T = <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> extends core::Object {
+ constructor •() → mai::C5<mai::C5::X>
+ : super core::Object::•() {
+ mai::expect(#C5, mai::C5::X);
+ }
+}
+class C6<X extends <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T% = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> extends core::Object {
+ constructor •() → mai::C6<mai::C6::X>
+ : super core::Object::•() {
+ mai::expect(#C6, mai::C6::X);
+ }
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+
+constants {
+ #C1 = TypeLiteralConstant(<T extends core::Object? = dynamic>(T*) →* T*)
+ #C2 = TypeLiteralConstant(<T extends core::Object? = dynamic>() →* void)
+ #C3 = TypeLiteralConstant(<T extends core::Object? = dynamic>() →* T*)
+ #C4 = TypeLiteralConstant(<T extends core::Object? = dynamic>(T*) →* void)
+ #C5 = TypeLiteralConstant(<T extends <S extends core::Object? = dynamic>(S*) →* S* = <S extends core::Object? = dynamic>(S*) →* S*>(T*) →* T*)
+ #C6 = TypeLiteralConstant(<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T*, S*, <V extends S* = S*, U extends core::Object? = dynamic>(T*, U*, V*, core::Map<S*, U*>*) →* V*) →* T*)
+}
diff --git a/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.weak.outline.expect b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.weak.outline.expect
new file mode 100644
index 0000000..b9ccc27
--- /dev/null
+++ b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.weak.outline.expect
@@ -0,0 +1,44 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///main_lib.dart";
+
+static method main() → dynamic
+ ;
+
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+typedef exp1 = <T extends core::Object? = dynamic>(T%) → T%;
+typedef exp2 = <T extends core::Object? = dynamic>() → void;
+typedef exp3 = <T extends core::Object? = dynamic>() → T%;
+typedef exp4 = <T extends core::Object? = dynamic>(T%) → void;
+typedef exp5 = <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T;
+typedef exp6 = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%;
+class C1<X extends <T extends core::Object? = dynamic>(T%) → T% = <T extends core::Object? = dynamic>(T%) → T%> extends core::Object {
+ constructor •() → self2::C1<self2::C1::X>
+ ;
+}
+class C2<X extends <T extends core::Object? = dynamic>() → void = <T extends core::Object? = dynamic>() → void> extends core::Object {
+ constructor •() → self2::C2<self2::C2::X>
+ ;
+}
+class C3<X extends <T extends core::Object? = dynamic>() → T% = <T extends core::Object? = dynamic>() → T%> extends core::Object {
+ constructor •() → self2::C3<self2::C3::X>
+ ;
+}
+class C4<X extends <T extends core::Object? = dynamic>(T%) → void = <T extends core::Object? = dynamic>(T%) → void> extends core::Object {
+ constructor •() → self2::C4<self2::C4::X>
+ ;
+}
+class C5<X extends <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T = <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> extends core::Object {
+ constructor •() → self2::C5<self2::C5::X>
+ ;
+}
+class C6<X extends <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T% = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> extends core::Object {
+ constructor •() → self2::C6<self2::C6::X>
+ ;
+}
+static method expect(dynamic expected, dynamic actual) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.weak.transformed.expect b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.weak.transformed.expect
new file mode 100644
index 0000000..e1e7067
--- /dev/null
+++ b/pkg/front_end/testcases/generic_metadata/from_dill/main.dart.weak.transformed.expect
@@ -0,0 +1,81 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "main_lib.dart" as mai;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///main_lib.dart";
+
+static method main() → dynamic {
+ mai::C1<<T extends core::Object? = dynamic>(T%) → T%> c1 = new mai::C1::•<<T extends core::Object? = dynamic>(T%) → T%>();
+ mai::C1<<T extends core::Object? = dynamic>(T%) → T%> c2 = new mai::C1::•<<T extends core::Object? = dynamic>(T%) → T%>();
+ mai::C2<<T extends core::Object? = dynamic>() → void> c3 = new mai::C2::•<<T extends core::Object? = dynamic>() → void>();
+ mai::C2<<T extends core::Object? = dynamic>() → void> c4 = new mai::C2::•<<int extends core::Object? = dynamic>() → void>();
+ mai::C3<<T extends core::Object? = dynamic>() → T%> c5 = new mai::C3::•<<T extends core::Object? = dynamic>() → T%>();
+ mai::C3<<T extends core::Object? = dynamic>() → T%> c6 = new mai::C3::•<<T extends core::Object? = dynamic>() → T%>();
+ mai::C4<<T extends core::Object? = dynamic>(T%) → void> c7 = new mai::C4::•<<T extends core::Object? = dynamic>(T%) → void>();
+ mai::C4<<T extends core::Object? = dynamic>(T%) → void> c8 = new mai::C4::•<<T extends core::Object? = dynamic>(T%) → void>();
+ mai::C5<<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> c9 = new mai::C5::•<<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T>();
+ mai::C5<<T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> c10 = new mai::C5::•<<T extends <S extends core::Object? = dynamic>(S%) → S% = <S extends core::Object? = dynamic>(S%) → S%>(T) → T>();
+ mai::C6<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> c11 = new mai::C6::•<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%>();
+ mai::C6<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> c12 = new mai::C6::•<<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = S%, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%>();
+}
+
+library /*isNonNullableByDefault*/;
+import self as mai;
+import "dart:core" as core;
+
+typedef exp1 = <T extends core::Object? = dynamic>(T%) → T%;
+typedef exp2 = <T extends core::Object? = dynamic>() → void;
+typedef exp3 = <T extends core::Object? = dynamic>() → T%;
+typedef exp4 = <T extends core::Object? = dynamic>(T%) → void;
+typedef exp5 = <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T;
+typedef exp6 = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%;
+class C1<X extends <T extends core::Object? = dynamic>(T%) → T% = <T extends core::Object? = dynamic>(T%) → T%> extends core::Object {
+ constructor •() → mai::C1<mai::C1::X>
+ : super core::Object::•() {
+ mai::expect(#C1, mai::C1::X);
+ }
+}
+class C2<X extends <T extends core::Object? = dynamic>() → void = <T extends core::Object? = dynamic>() → void> extends core::Object {
+ constructor •() → mai::C2<mai::C2::X>
+ : super core::Object::•() {
+ mai::expect(#C2, mai::C2::X);
+ }
+}
+class C3<X extends <T extends core::Object? = dynamic>() → T% = <T extends core::Object? = dynamic>() → T%> extends core::Object {
+ constructor •() → mai::C3<mai::C3::X>
+ : super core::Object::•() {
+ mai::expect(#C3, mai::C3::X);
+ }
+}
+class C4<X extends <T extends core::Object? = dynamic>(T%) → void = <T extends core::Object? = dynamic>(T%) → void> extends core::Object {
+ constructor •() → mai::C4<mai::C4::X>
+ : super core::Object::•() {
+ mai::expect(#C4, mai::C4::X);
+ }
+}
+class C5<X extends <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T = <T extends <S extends core::Object? = dynamic>(S%) → S% = dynamic>(T) → T> extends core::Object {
+ constructor •() → mai::C5<mai::C5::X>
+ : super core::Object::•() {
+ mai::expect(#C5, mai::C5::X);
+ }
+}
+class C6<X extends <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T% = <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T%, S%, <V extends S% = dynamic, U extends core::Object? = dynamic>(T%, U%, V%, core::Map<S%, U%>) → V%) → T%> extends core::Object {
+ constructor •() → mai::C6<mai::C6::X>
+ : super core::Object::•() {
+ mai::expect(#C6, mai::C6::X);
+ }
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+
+constants {
+ #C1 = TypeLiteralConstant(<T extends core::Object? = dynamic>(T*) →* T*)
+ #C2 = TypeLiteralConstant(<T extends core::Object? = dynamic>() →* void)
+ #C3 = TypeLiteralConstant(<T extends core::Object? = dynamic>() →* T*)
+ #C4 = TypeLiteralConstant(<T extends core::Object? = dynamic>(T*) →* void)
+ #C5 = TypeLiteralConstant(<T extends <S extends core::Object? = dynamic>(S*) →* S* = <S extends core::Object? = dynamic>(S*) →* S*>(T*) →* T*)
+ #C6 = TypeLiteralConstant(<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(T*, S*, <V extends S* = S*, U extends core::Object? = dynamic>(T*, U*, V*, core::Map<S*, U*>*) →* V*) →* T*)
+}
diff --git a/pkg/front_end/testcases/generic_metadata/from_dill/main_lib.dart b/pkg/front_end/testcases/generic_metadata/from_dill/main_lib.dart
new file mode 100644
index 0000000..5a1661c
--- /dev/null
+++ b/pkg/front_end/testcases/generic_metadata/from_dill/main_lib.dart
@@ -0,0 +1,53 @@
+// 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.
+
+typedef exp1 = T Function<T>(T);
+typedef exp2 = void Function<T>();
+typedef exp3 = T Function<T>();
+typedef exp4 = void Function<T>(T);
+typedef exp5 = T Function<T extends S Function<S>(S)>(T);
+typedef exp6 = T Function<T, S>(
+ T, S, V Function<V extends S, U>(T, U, V, Map<S, U>));
+
+class C1<X extends T Function<T>(T)> {
+ C1() {
+ expect(exp1, X);
+ }
+}
+
+class C2<X extends void Function<T>()> {
+ C2() {
+ expect(exp2, X);
+ }
+}
+
+class C3<X extends T Function<T>()> {
+ C3() {
+ expect(exp3, X);
+ }
+}
+
+class C4<X extends void Function<T>(T)> {
+ C4() {
+ expect(exp4, X);
+ }
+}
+
+class C5<X extends T Function<T extends S Function<S>(S)>(T)> {
+ C5() {
+ expect(exp5, X);
+ }
+}
+
+class C6<
+ X extends T Function<T, S>(
+ T, S, V Function<V extends S, U>(T, U, V, Map<S, U>))> {
+ C6() {
+ expect(exp6, X);
+ }
+}
+
+expect(expected, actual) {
+ if (expected != actual) throw 'Expected $expected, actual $actual';
+}
diff --git a/pkg/front_end/testcases/generic_metadata/from_dill/test.options b/pkg/front_end/testcases/generic_metadata/from_dill/test.options
new file mode 100644
index 0000000..bfe6dc8
--- /dev/null
+++ b/pkg/front_end/testcases/generic_metadata/from_dill/test.options
@@ -0,0 +1 @@
+main_lib.dart
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart
new file mode 100644
index 0000000..30966c9
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart
@@ -0,0 +1,57 @@
+// 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 'nullable_supertypes.dart' as prefix;
+
+class A {}
+class B {}
+class C {}
+
+typedef AAlias = A?;
+typedef BAlias = B?;
+typedef CAlias = C?;
+typedef TAlias<T> = T?;
+
+class C1 extends AAlias {}
+
+class C2 implements AAlias {}
+
+class C3 = A with BAlias;
+
+class C4 = A with B implements CAlias;
+
+class C5 extends A with BAlias {}
+
+mixin M1 on AAlias {}
+
+mixin M2 on A, BAlias {}
+
+mixin M3 on A implements BAlias {}
+
+class D1 extends TAlias<A> {}
+
+class D1a extends prefix.TAlias<A> {}
+
+class D1b extends TAlias<prefix.A> {}
+
+class D2 implements TAlias<A> {}
+
+class D3 = A with TAlias<B>;
+
+class D4 = A with B implements TAlias<C>;
+
+class D5 extends A with TAlias<B> {}
+
+mixin N1 on TAlias<A> {}
+
+mixin N1a on prefix.TAlias<A> {}
+
+mixin N1b on TAlias<prefix.A> {}
+
+mixin N2 on A, TAlias<B> {}
+
+mixin N3 on A implements TAlias<B> {}
+
+main() {
+}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.strong.expect b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.strong.expect
new file mode 100644
index 0000000..1a2fe24
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.strong.expect
@@ -0,0 +1,383 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:32:18: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1 extends TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:34:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1a extends prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:36:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1b extends TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:38:21: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D2 implements TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:7: Error: The type 'TAlias' can't be mixed in.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:42:32: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D4 = A with B implements TAlias<C>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:25: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:7: Error: The type 'TAlias' can't be mixed in.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:46:13: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1 on TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:48:14: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1a on prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:50:14: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1b on TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:52:16: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N2 on A, TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:54:26: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N3 on A implements TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:16:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C1 extends AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:18:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C2 implements AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:20:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C3 = A with BAlias;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:22:7: Error: The type 'CAlias' which is an alias of 'C?' can't be used as supertype because it is nullable.
+// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C4 = A with B implements CAlias;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:13:9: Context: The issue arises via this type alias.
+// typedef CAlias = C?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:24:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C5 extends A with BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:26:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M1 on AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:28:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M2 on A, BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:30:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M3 on A implements BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:32:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1 extends TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:34:7: Error: The type 'prefix.TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1a extends prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:36:7: Error: The type 'TAlias<prefix.A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1b extends TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:38:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D2 implements TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:42:7: Error: The type 'TAlias<C>' which is an alias of 'C?' can't be used as supertype because it is nullable.
+// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D4 = A with B implements TAlias<C>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:46:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1 on TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:48:7: Error: The type 'prefix.TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1a on prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:50:7: Error: The type 'TAlias<prefix.A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1b on TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:52:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N2 on A, TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:54:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N3 on A implements TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///nullable_supertypes.dart" as prefix;
+
+typedef AAlias = self::A?;
+typedef BAlias = self::B?;
+typedef CAlias = self::C?;
+typedef TAlias<T extends core::Object? = dynamic> = T?;
+class A extends core::Object {
+ synthetic constructor •() → self::A
+ : super core::Object::•()
+ ;
+}
+class B extends core::Object {
+ synthetic constructor •() → self::B
+ : super core::Object::•()
+ ;
+}
+class C extends core::Object {
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+class C1 extends core::Object {
+ synthetic constructor •() → self::C1
+ : super core::Object::•()
+ ;
+}
+class C2 extends core::Object {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+}
+class C3 extends self::A {
+ synthetic constructor •() → self::C3
+ : super self::A::•()
+ ;
+}
+class C4 = self::A with self::B {
+ synthetic constructor •() → self::C4
+ : super self::A::•()
+ ;
+}
+abstract class _C5&A&BAlias extends self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_C5&A&BAlias
+ : super self::A::•()
+ ;
+}
+class C5 extends self::_C5&A&BAlias {
+ synthetic constructor •() → self::C5
+ : super self::_C5&A&BAlias::•()
+ ;
+}
+abstract class M1 extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class _M2&A&BAlias extends core::Object implements self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_M2&A&BAlias
+ : super core::Object::•()
+ ;
+}
+abstract class M2 extends self::_M2&A&BAlias /*isMixinDeclaration*/ {
+}
+abstract class M3 extends self::A /*isMixinDeclaration*/ {
+}
+class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ : super core::Object::•()
+ ;
+}
+class D1a extends core::Object {
+ synthetic constructor •() → self::D1a
+ : super core::Object::•()
+ ;
+}
+class D1b extends core::Object {
+ synthetic constructor •() → self::D1b
+ : super core::Object::•()
+ ;
+}
+class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ : super core::Object::•()
+ ;
+}
+class D3 extends self::A {
+ synthetic constructor •() → self::D3
+ : super self::A::•()
+ ;
+}
+class D4 = self::A with self::B {
+ synthetic constructor •() → self::D4
+ : super self::A::•()
+ ;
+}
+abstract class _D5&A&TAlias extends self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_D5&A&TAlias
+ : super self::A::•()
+ ;
+}
+class D5 extends self::_D5&A&TAlias {
+ synthetic constructor •() → self::D5
+ : super self::_D5&A&TAlias::•()
+ ;
+}
+abstract class N1 extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class N1a extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class N1b extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class _N2&A&TAlias extends core::Object implements self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_N2&A&TAlias
+ : super core::Object::•()
+ ;
+}
+abstract class N2 extends self::_N2&A&TAlias /*isMixinDeclaration*/ {
+}
+abstract class N3 extends self::A /*isMixinDeclaration*/ {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.strong.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.strong.transformed.expect
new file mode 100644
index 0000000..5dac514
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.strong.transformed.expect
@@ -0,0 +1,383 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:32:18: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1 extends TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:34:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1a extends prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:36:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1b extends TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:38:21: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D2 implements TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:7: Error: The type 'TAlias' can't be mixed in.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:42:32: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D4 = A with B implements TAlias<C>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:25: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:7: Error: The type 'TAlias' can't be mixed in.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:46:13: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1 on TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:48:14: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1a on prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:50:14: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1b on TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:52:16: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N2 on A, TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:54:26: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N3 on A implements TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:16:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C1 extends AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:18:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C2 implements AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:20:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C3 = A with BAlias;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:22:7: Error: The type 'CAlias' which is an alias of 'C?' can't be used as supertype because it is nullable.
+// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C4 = A with B implements CAlias;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:13:9: Context: The issue arises via this type alias.
+// typedef CAlias = C?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:24:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C5 extends A with BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:26:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M1 on AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:28:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M2 on A, BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:30:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M3 on A implements BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:32:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1 extends TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:34:7: Error: The type 'prefix.TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1a extends prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:36:7: Error: The type 'TAlias<prefix.A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1b extends TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:38:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D2 implements TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:42:7: Error: The type 'TAlias<C>' which is an alias of 'C?' can't be used as supertype because it is nullable.
+// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D4 = A with B implements TAlias<C>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:46:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1 on TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:48:7: Error: The type 'prefix.TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1a on prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:50:7: Error: The type 'TAlias<prefix.A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1b on TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:52:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N2 on A, TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:54:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N3 on A implements TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///nullable_supertypes.dart" as prefix;
+
+typedef AAlias = self::A?;
+typedef BAlias = self::B?;
+typedef CAlias = self::C?;
+typedef TAlias<T extends core::Object? = dynamic> = T?;
+class A extends core::Object {
+ synthetic constructor •() → self::A
+ : super core::Object::•()
+ ;
+}
+class B extends core::Object {
+ synthetic constructor •() → self::B
+ : super core::Object::•()
+ ;
+}
+class C extends core::Object {
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+class C1 extends core::Object {
+ synthetic constructor •() → self::C1
+ : super core::Object::•()
+ ;
+}
+class C2 extends core::Object {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+}
+class C3 extends self::A {
+ synthetic constructor •() → self::C3
+ : super self::A::•()
+ ;
+}
+class C4 extends self::A implements self::B /*isEliminatedMixin*/ {
+ synthetic constructor •() → self::C4
+ : super self::A::•()
+ ;
+}
+abstract class _C5&A&BAlias extends self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_C5&A&BAlias
+ : super self::A::•()
+ ;
+}
+class C5 extends self::_C5&A&BAlias {
+ synthetic constructor •() → self::C5
+ : super self::_C5&A&BAlias::•()
+ ;
+}
+abstract class M1 extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class _M2&A&BAlias extends core::Object implements self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_M2&A&BAlias
+ : super core::Object::•()
+ ;
+}
+abstract class M2 extends self::_M2&A&BAlias /*isMixinDeclaration*/ {
+}
+abstract class M3 extends self::A /*isMixinDeclaration*/ {
+}
+class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ : super core::Object::•()
+ ;
+}
+class D1a extends core::Object {
+ synthetic constructor •() → self::D1a
+ : super core::Object::•()
+ ;
+}
+class D1b extends core::Object {
+ synthetic constructor •() → self::D1b
+ : super core::Object::•()
+ ;
+}
+class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ : super core::Object::•()
+ ;
+}
+class D3 extends self::A {
+ synthetic constructor •() → self::D3
+ : super self::A::•()
+ ;
+}
+class D4 extends self::A implements self::B /*isEliminatedMixin*/ {
+ synthetic constructor •() → self::D4
+ : super self::A::•()
+ ;
+}
+abstract class _D5&A&TAlias extends self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_D5&A&TAlias
+ : super self::A::•()
+ ;
+}
+class D5 extends self::_D5&A&TAlias {
+ synthetic constructor •() → self::D5
+ : super self::_D5&A&TAlias::•()
+ ;
+}
+abstract class N1 extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class N1a extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class N1b extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class _N2&A&TAlias extends core::Object implements self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_N2&A&TAlias
+ : super core::Object::•()
+ ;
+}
+abstract class N2 extends self::_N2&A&TAlias /*isMixinDeclaration*/ {
+}
+abstract class N3 extends self::A /*isMixinDeclaration*/ {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.textual_outline.expect b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.textual_outline.expect
new file mode 100644
index 0000000..fbfa19f
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.textual_outline.expect
@@ -0,0 +1,29 @@
+import 'nullable_supertypes.dart' as prefix;
+class A {}
+class B {}
+class C {}
+typedef AAlias = A?;
+typedef BAlias = B?;
+typedef CAlias = C?;
+typedef TAlias<T> = T?;
+class C1 extends AAlias {}
+class C2 implements AAlias {}
+class C3 = A with BAlias;
+class C4 = A with B implements CAlias;
+class C5 extends A with BAlias {}
+mixin M1 on AAlias {}
+mixin M2 on A, BAlias {}
+mixin M3 on A implements BAlias {}
+class D1 extends TAlias<A> {}
+class D1a extends prefix.TAlias<A> {}
+class D1b extends TAlias<prefix.A> {}
+class D2 implements TAlias<A> {}
+class D3 = A with TAlias<B>;
+class D4 = A with B implements TAlias<C>;
+class D5 extends A with TAlias<B> {}
+mixin N1 on TAlias<A> {}
+mixin N1a on prefix.TAlias<A> {}
+mixin N1b on TAlias<prefix.A> {}
+mixin N2 on A, TAlias<B> {}
+mixin N3 on A implements TAlias<B> {}
+main() {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.weak.expect b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.weak.expect
new file mode 100644
index 0000000..1a2fe24
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.weak.expect
@@ -0,0 +1,383 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:32:18: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1 extends TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:34:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1a extends prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:36:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1b extends TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:38:21: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D2 implements TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:7: Error: The type 'TAlias' can't be mixed in.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:42:32: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D4 = A with B implements TAlias<C>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:25: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:7: Error: The type 'TAlias' can't be mixed in.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:46:13: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1 on TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:48:14: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1a on prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:50:14: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1b on TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:52:16: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N2 on A, TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:54:26: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N3 on A implements TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:16:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C1 extends AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:18:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C2 implements AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:20:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C3 = A with BAlias;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:22:7: Error: The type 'CAlias' which is an alias of 'C?' can't be used as supertype because it is nullable.
+// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C4 = A with B implements CAlias;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:13:9: Context: The issue arises via this type alias.
+// typedef CAlias = C?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:24:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C5 extends A with BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:26:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M1 on AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:28:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M2 on A, BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:30:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M3 on A implements BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:32:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1 extends TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:34:7: Error: The type 'prefix.TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1a extends prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:36:7: Error: The type 'TAlias<prefix.A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1b extends TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:38:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D2 implements TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:42:7: Error: The type 'TAlias<C>' which is an alias of 'C?' can't be used as supertype because it is nullable.
+// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D4 = A with B implements TAlias<C>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:46:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1 on TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:48:7: Error: The type 'prefix.TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1a on prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:50:7: Error: The type 'TAlias<prefix.A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1b on TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:52:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N2 on A, TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:54:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N3 on A implements TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///nullable_supertypes.dart" as prefix;
+
+typedef AAlias = self::A?;
+typedef BAlias = self::B?;
+typedef CAlias = self::C?;
+typedef TAlias<T extends core::Object? = dynamic> = T?;
+class A extends core::Object {
+ synthetic constructor •() → self::A
+ : super core::Object::•()
+ ;
+}
+class B extends core::Object {
+ synthetic constructor •() → self::B
+ : super core::Object::•()
+ ;
+}
+class C extends core::Object {
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+class C1 extends core::Object {
+ synthetic constructor •() → self::C1
+ : super core::Object::•()
+ ;
+}
+class C2 extends core::Object {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+}
+class C3 extends self::A {
+ synthetic constructor •() → self::C3
+ : super self::A::•()
+ ;
+}
+class C4 = self::A with self::B {
+ synthetic constructor •() → self::C4
+ : super self::A::•()
+ ;
+}
+abstract class _C5&A&BAlias extends self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_C5&A&BAlias
+ : super self::A::•()
+ ;
+}
+class C5 extends self::_C5&A&BAlias {
+ synthetic constructor •() → self::C5
+ : super self::_C5&A&BAlias::•()
+ ;
+}
+abstract class M1 extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class _M2&A&BAlias extends core::Object implements self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_M2&A&BAlias
+ : super core::Object::•()
+ ;
+}
+abstract class M2 extends self::_M2&A&BAlias /*isMixinDeclaration*/ {
+}
+abstract class M3 extends self::A /*isMixinDeclaration*/ {
+}
+class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ : super core::Object::•()
+ ;
+}
+class D1a extends core::Object {
+ synthetic constructor •() → self::D1a
+ : super core::Object::•()
+ ;
+}
+class D1b extends core::Object {
+ synthetic constructor •() → self::D1b
+ : super core::Object::•()
+ ;
+}
+class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ : super core::Object::•()
+ ;
+}
+class D3 extends self::A {
+ synthetic constructor •() → self::D3
+ : super self::A::•()
+ ;
+}
+class D4 = self::A with self::B {
+ synthetic constructor •() → self::D4
+ : super self::A::•()
+ ;
+}
+abstract class _D5&A&TAlias extends self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_D5&A&TAlias
+ : super self::A::•()
+ ;
+}
+class D5 extends self::_D5&A&TAlias {
+ synthetic constructor •() → self::D5
+ : super self::_D5&A&TAlias::•()
+ ;
+}
+abstract class N1 extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class N1a extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class N1b extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class _N2&A&TAlias extends core::Object implements self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_N2&A&TAlias
+ : super core::Object::•()
+ ;
+}
+abstract class N2 extends self::_N2&A&TAlias /*isMixinDeclaration*/ {
+}
+abstract class N3 extends self::A /*isMixinDeclaration*/ {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.weak.outline.expect b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.weak.outline.expect
new file mode 100644
index 0000000..a0cf738
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.weak.outline.expect
@@ -0,0 +1,371 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:32:18: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1 extends TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:34:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1a extends prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:36:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1b extends TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:38:21: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D2 implements TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:7: Error: The type 'TAlias' can't be mixed in.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:42:32: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D4 = A with B implements TAlias<C>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:25: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:7: Error: The type 'TAlias' can't be mixed in.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:46:13: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1 on TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:48:14: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1a on prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:50:14: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1b on TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:52:16: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N2 on A, TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:54:26: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N3 on A implements TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:16:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C1 extends AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:18:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C2 implements AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:20:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C3 = A with BAlias;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:22:7: Error: The type 'CAlias' which is an alias of 'C?' can't be used as supertype because it is nullable.
+// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C4 = A with B implements CAlias;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:13:9: Context: The issue arises via this type alias.
+// typedef CAlias = C?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:24:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C5 extends A with BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:26:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M1 on AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:28:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M2 on A, BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:30:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M3 on A implements BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:32:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1 extends TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:34:7: Error: The type 'prefix.TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1a extends prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:36:7: Error: The type 'TAlias<prefix.A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1b extends TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:38:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D2 implements TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:42:7: Error: The type 'TAlias<C>' which is an alias of 'C?' can't be used as supertype because it is nullable.
+// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D4 = A with B implements TAlias<C>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:46:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1 on TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:48:7: Error: The type 'prefix.TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1a on prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:50:7: Error: The type 'TAlias<prefix.A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1b on TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:52:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N2 on A, TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:54:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N3 on A implements TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///nullable_supertypes.dart" as prefix;
+
+typedef AAlias = self::A?;
+typedef BAlias = self::B?;
+typedef CAlias = self::C?;
+typedef TAlias<T extends core::Object? = dynamic> = T?;
+class A extends core::Object {
+ synthetic constructor •() → self::A
+ ;
+}
+class B extends core::Object {
+ synthetic constructor •() → self::B
+ ;
+}
+class C extends core::Object {
+ synthetic constructor •() → self::C
+ ;
+}
+class C1 extends core::Object {
+ synthetic constructor •() → self::C1
+ ;
+}
+class C2 extends core::Object {
+ synthetic constructor •() → self::C2
+ ;
+}
+class C3 extends self::A {
+ synthetic constructor •() → self::C3
+ : super self::A::•()
+ ;
+}
+class C4 = self::A with self::B {
+ synthetic constructor •() → self::C4
+ : super self::A::•()
+ ;
+}
+abstract class _C5&A&BAlias extends self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_C5&A&BAlias
+ : super self::A::•()
+ ;
+}
+class C5 extends self::_C5&A&BAlias {
+ synthetic constructor •() → self::C5
+ ;
+}
+abstract class M1 extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class _M2&A&BAlias extends core::Object implements self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_M2&A&BAlias
+ ;
+}
+abstract class M2 extends self::_M2&A&BAlias /*isMixinDeclaration*/ {
+}
+abstract class M3 extends self::A /*isMixinDeclaration*/ {
+}
+class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ ;
+}
+class D1a extends core::Object {
+ synthetic constructor •() → self::D1a
+ ;
+}
+class D1b extends core::Object {
+ synthetic constructor •() → self::D1b
+ ;
+}
+class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ ;
+}
+class D3 extends self::A {
+ synthetic constructor •() → self::D3
+ : super self::A::•()
+ ;
+}
+class D4 = self::A with self::B {
+ synthetic constructor •() → self::D4
+ : super self::A::•()
+ ;
+}
+abstract class _D5&A&TAlias extends self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_D5&A&TAlias
+ : super self::A::•()
+ ;
+}
+class D5 extends self::_D5&A&TAlias {
+ synthetic constructor •() → self::D5
+ ;
+}
+abstract class N1 extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class N1a extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class N1b extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class _N2&A&TAlias extends core::Object implements self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_N2&A&TAlias
+ ;
+}
+abstract class N2 extends self::_N2&A&TAlias /*isMixinDeclaration*/ {
+}
+abstract class N3 extends self::A /*isMixinDeclaration*/ {
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.weak.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.weak.transformed.expect
new file mode 100644
index 0000000..5dac514
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart.weak.transformed.expect
@@ -0,0 +1,383 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:32:18: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1 extends TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:34:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1a extends prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:36:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D1b extends TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:38:21: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D2 implements TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:19: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:7: Error: The type 'TAlias' can't be mixed in.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:42:32: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D4 = A with B implements TAlias<C>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:25: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:7: Error: The type 'TAlias' can't be mixed in.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:46:13: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1 on TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:48:14: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1a on prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:50:14: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N1b on TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:52:16: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N2 on A, TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:54:26: Error: Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
+// mixin N3 on A implements TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:16: Context: This is the type variable ultimately denoted.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:16:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C1 extends AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:18:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C2 implements AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:20:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C3 = A with BAlias;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:22:7: Error: The type 'CAlias' which is an alias of 'C?' can't be used as supertype because it is nullable.
+// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C4 = A with B implements CAlias;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:13:9: Context: The issue arises via this type alias.
+// typedef CAlias = C?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:24:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class C5 extends A with BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:26:7: Error: The type 'AAlias' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M1 on AAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:11:9: Context: The issue arises via this type alias.
+// typedef AAlias = A?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:28:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M2 on A, BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:30:7: Error: The type 'BAlias' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin M3 on A implements BAlias {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:12:9: Context: The issue arises via this type alias.
+// typedef BAlias = B?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:32:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1 extends TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:34:7: Error: The type 'prefix.TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1a extends prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:36:7: Error: The type 'TAlias<prefix.A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D1b extends TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:38:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D2 implements TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:40:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D3 = A with TAlias<B>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:42:7: Error: The type 'TAlias<C>' which is an alias of 'C?' can't be used as supertype because it is nullable.
+// - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D4 = A with B implements TAlias<C>;
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:44:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// class D5 extends A with TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:46:7: Error: The type 'TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1 on TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:48:7: Error: The type 'prefix.TAlias<A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1a on prefix.TAlias<A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:50:7: Error: The type 'TAlias<prefix.A>' which is an alias of 'A?' can't be used as supertype because it is nullable.
+// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N1b on TAlias<prefix.A> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:52:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N2 on A, TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:54:7: Error: The type 'TAlias<B>' which is an alias of 'B?' can't be used as supertype because it is nullable.
+// - 'B' is from 'pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart'.
+// mixin N3 on A implements TAlias<B> {}
+// ^
+// pkg/front_end/testcases/nonfunction_type_aliases/nullable_supertypes.dart:14:9: Context: The issue arises via this type alias.
+// typedef TAlias<T> = T?;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///nullable_supertypes.dart" as prefix;
+
+typedef AAlias = self::A?;
+typedef BAlias = self::B?;
+typedef CAlias = self::C?;
+typedef TAlias<T extends core::Object? = dynamic> = T?;
+class A extends core::Object {
+ synthetic constructor •() → self::A
+ : super core::Object::•()
+ ;
+}
+class B extends core::Object {
+ synthetic constructor •() → self::B
+ : super core::Object::•()
+ ;
+}
+class C extends core::Object {
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+class C1 extends core::Object {
+ synthetic constructor •() → self::C1
+ : super core::Object::•()
+ ;
+}
+class C2 extends core::Object {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+}
+class C3 extends self::A {
+ synthetic constructor •() → self::C3
+ : super self::A::•()
+ ;
+}
+class C4 extends self::A implements self::B /*isEliminatedMixin*/ {
+ synthetic constructor •() → self::C4
+ : super self::A::•()
+ ;
+}
+abstract class _C5&A&BAlias extends self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_C5&A&BAlias
+ : super self::A::•()
+ ;
+}
+class C5 extends self::_C5&A&BAlias {
+ synthetic constructor •() → self::C5
+ : super self::_C5&A&BAlias::•()
+ ;
+}
+abstract class M1 extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class _M2&A&BAlias extends core::Object implements self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_M2&A&BAlias
+ : super core::Object::•()
+ ;
+}
+abstract class M2 extends self::_M2&A&BAlias /*isMixinDeclaration*/ {
+}
+abstract class M3 extends self::A /*isMixinDeclaration*/ {
+}
+class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ : super core::Object::•()
+ ;
+}
+class D1a extends core::Object {
+ synthetic constructor •() → self::D1a
+ : super core::Object::•()
+ ;
+}
+class D1b extends core::Object {
+ synthetic constructor •() → self::D1b
+ : super core::Object::•()
+ ;
+}
+class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ : super core::Object::•()
+ ;
+}
+class D3 extends self::A {
+ synthetic constructor •() → self::D3
+ : super self::A::•()
+ ;
+}
+class D4 extends self::A implements self::B /*isEliminatedMixin*/ {
+ synthetic constructor •() → self::D4
+ : super self::A::•()
+ ;
+}
+abstract class _D5&A&TAlias extends self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_D5&A&TAlias
+ : super self::A::•()
+ ;
+}
+class D5 extends self::_D5&A&TAlias {
+ synthetic constructor •() → self::D5
+ : super self::_D5&A&TAlias::•()
+ ;
+}
+abstract class N1 extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class N1a extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class N1b extends core::Object /*isMixinDeclaration*/ {
+}
+abstract class _N2&A&TAlias extends core::Object implements self::A /*isAnonymousMixin*/ {
+ synthetic constructor •() → self::_N2&A&TAlias
+ : super core::Object::•()
+ ;
+}
+abstract class N2 extends self::_N2&A&TAlias /*isMixinDeclaration*/ {
+}
+abstract class N3 extends self::A /*isMixinDeclaration*/ {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/textual_outline.status b/pkg/front_end/testcases/textual_outline.status
index b30bc2c..6585a37 100644
--- a/pkg/front_end/testcases/textual_outline.status
+++ b/pkg/front_end/testcases/textual_outline.status
@@ -132,6 +132,7 @@
nonfunction_type_aliases/issue41501: FormatterCrash
nonfunction_type_aliases/issue42446: FormatterCrash
nonfunction_type_aliases/issue45051: FormatterCrash
+nonfunction_type_aliases/nullable_supertypes: FormatterCrash
nonfunction_type_aliases/unaliased_bounds_checks_in_constructor_calls: FormatterCrash
rasta/bad_redirection: FormatterCrash
rasta/issue_000032: FormatterCrash
diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md
index eb6976c..b594898 100644
--- a/pkg/kernel/binary.md
+++ b/pkg/kernel/binary.md
@@ -147,7 +147,7 @@
type ComponentFile {
UInt32 magic = 0x90ABCDEF;
- UInt32 formatVersion = 59;
+ UInt32 formatVersion = 60;
Byte[10] shortSdkHash;
List<String> problemsAsJson; // Described in problems.md.
Library[] libraries;
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index c8c332e..33f0f3e 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -21,7 +21,7 @@
VariableIndexer? _variableIndexer;
LabelIndexer? _labelIndexer;
SwitchCaseIndexer? _switchCaseIndexer;
- final TypeParameterIndexer _typeParameterIndexer = new TypeParameterIndexer();
+ TypeParameterIndexer _typeParameterIndexer = new TypeParameterIndexer();
final StringIndexer stringIndexer;
late ConstantIndexer _constantIndexer;
final UriIndexer _sourceUriIndexer = new UriIndexer();
@@ -191,6 +191,8 @@
}
int writeConstantTableEntry(Constant constant) {
+ TypeParameterIndexer oldTypeParameterIndexer = _typeParameterIndexer;
+ _typeParameterIndexer = new TypeParameterIndexer();
BufferedSink oldSink = _sink;
_sink = _constantsSink;
int initialOffset = _sink.offset;
@@ -263,6 +265,7 @@
throw new ArgumentError('Unsupported constant $constant');
}
_sink = oldSink;
+ _typeParameterIndexer = oldTypeParameterIndexer;
return _constantsSink.offset - initialOffset;
}
diff --git a/pkg/kernel/lib/binary/tag.dart b/pkg/kernel/lib/binary/tag.dart
index 5e9fa25..fca44c6 100644
--- a/pkg/kernel/lib/binary/tag.dart
+++ b/pkg/kernel/lib/binary/tag.dart
@@ -174,7 +174,7 @@
/// Internal version of kernel binary format.
/// Bump it when making incompatible changes in kernel binaries.
/// Keep in sync with runtime/vm/kernel_binary.h, pkg/kernel/binary.md.
- static const int BinaryFormatVersion = 59;
+ static const int BinaryFormatVersion = 60;
}
abstract class ConstantTag {
diff --git a/runtime/vm/compiler/frontend/constant_reader.cc b/runtime/vm/compiler/frontend/constant_reader.cc
index 215ced2..b75d8cb 100644
--- a/runtime/vm/compiler/frontend/constant_reader.cc
+++ b/runtime/vm/compiler/frontend/constant_reader.cc
@@ -201,8 +201,9 @@
Class::Handle(Z, corelib.LookupClassAllowPrivate(Symbols::_List()));
// Build type from the raw bytes (needs temporary translator).
TypeTranslator type_translator(
- &reader, this, active_class_, true,
- active_class_->RequireConstCanonicalTypeErasure(null_safety));
+ &reader, this, active_class_, /* finalize = */ true,
+ active_class_->RequireConstCanonicalTypeErasure(null_safety),
+ /* in_constant_context = */ true);
auto& type_arguments =
TypeArguments::Handle(Z, TypeArguments::New(1, Heap::kOld));
AbstractType& type = type_translator.BuildType();
@@ -244,8 +245,9 @@
instance = Instance::New(klass, Heap::kOld);
// Build type from the raw bytes (needs temporary translator).
TypeTranslator type_translator(
- &reader, this, active_class_, true,
- active_class_->RequireConstCanonicalTypeErasure(null_safety));
+ &reader, this, active_class_, /* finalize = */ true,
+ active_class_->RequireConstCanonicalTypeErasure(null_safety),
+ /* in_constant_context = */ true);
const intptr_t number_of_type_arguments = reader.ReadUInt();
if (klass.NumTypeArguments() > 0) {
auto& type_arguments = TypeArguments::Handle(
@@ -288,8 +290,9 @@
// Build type from the raw bytes (needs temporary translator).
TypeTranslator type_translator(
- &reader, this, active_class_, true,
- active_class_->RequireConstCanonicalTypeErasure(null_safety));
+ &reader, this, active_class_, /* finalize = */ true,
+ active_class_->RequireConstCanonicalTypeErasure(null_safety),
+ /* in_constant_context = */ true);
const intptr_t number_of_type_arguments = reader.ReadUInt();
ASSERT(number_of_type_arguments > 0);
auto& type_arguments = TypeArguments::Handle(
@@ -327,7 +330,10 @@
// canonicalized to an identical representant independently of the null
// safety mode currently in use (sound or unsound) or migration state of
// the declaring library (legacy or opted-in).
- TypeTranslator type_translator(&reader, this, active_class_, true);
+ TypeTranslator type_translator(&reader, this, active_class_,
+ /* finalize = */ true,
+ /* apply_canonical_type_erasure = */ false,
+ /* in_constant_context = */ true);
instance = type_translator.BuildType().ptr();
break;
}
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index 3b5421f..c83e6cb 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -2926,7 +2926,8 @@
ConstantReader* constant_reader,
ActiveClass* active_class,
bool finalize,
- bool apply_canonical_type_erasure)
+ bool apply_canonical_type_erasure,
+ bool in_constant_context)
: helper_(helper),
constant_reader_(constant_reader),
translation_helper_(helper->translation_helper_),
@@ -2937,7 +2938,8 @@
zone_(translation_helper_.zone()),
result_(AbstractType::Handle(translation_helper_.zone())),
finalize_(finalize),
- apply_canonical_type_erasure_(apply_canonical_type_erasure) {}
+ apply_canonical_type_erasure_(apply_canonical_type_erasure),
+ in_constant_context_(in_constant_context) {}
AbstractType& TypeTranslator::BuildType() {
BuildTypeInternal();
@@ -3152,73 +3154,76 @@
intptr_t parameter_index = helper_->ReadUInt(); // read parameter index.
helper_->SkipOptionalDartType(); // read bound.
- const TypeArguments& class_types =
- TypeArguments::Handle(Z, active_class_->klass->type_parameters());
- if (parameter_index < class_types.Length()) {
- // The index of the type parameter in [parameters] is
- // the same index into the `klass->type_parameters()` array.
- const auto& type_param =
- TypeParameter::CheckedHandle(Z, class_types.TypeAt(parameter_index));
- result_ = type_param.ToNullability(nullability, Heap::kOld);
- active_class_->RecordDerivedTypeParameter(Z, type_param,
- TypeParameter::Cast(result_));
- return;
- }
- parameter_index -= class_types.Length();
-
- if (active_class_->HasMember()) {
- if (active_class_->MemberIsFactoryProcedure()) {
- //
- // WARNING: This is a little hackish:
- //
- // We have a static factory constructor. The kernel IR gives the factory
- // constructor function its own type parameters (which are equal in name
- // and number to the ones of the enclosing class). I.e.,
- //
- // class A<T> {
- // factory A.x() { return new B<T>(); }
- // }
- //
- // is basically translated to this:
- //
- // class A<T> {
- // static A.x<T'>() { return new B<T'>(); }
- // }
- //
- if (class_types.Length() > parameter_index) {
- const auto& type_param = TypeParameter::CheckedHandle(
- Z, class_types.TypeAt(parameter_index));
- result_ = type_param.ToNullability(nullability, Heap::kOld);
- active_class_->RecordDerivedTypeParameter(Z, type_param,
- TypeParameter::Cast(result_));
- return;
- }
- parameter_index -= class_types.Length();
+ // If the type is from a constant, the parameter index isn't offset by the
+ // enclosing context.
+ if (!in_constant_context_) {
+ const TypeArguments& class_types =
+ TypeArguments::Handle(Z, active_class_->klass->type_parameters());
+ if (parameter_index < class_types.Length()) {
+ // The index of the type parameter in [parameters] is
+ // the same index into the `klass->type_parameters()` array.
+ const auto& type_param =
+ TypeParameter::CheckedHandle(Z, class_types.TypeAt(parameter_index));
+ result_ = type_param.ToNullability(nullability, Heap::kOld);
+ active_class_->RecordDerivedTypeParameter(Z, type_param,
+ TypeParameter::Cast(result_));
+ return;
}
- // Factory function should not be considered as procedure.
- intptr_t procedure_type_parameter_count =
- (active_class_->MemberIsProcedure() &&
- !active_class_->MemberIsFactoryProcedure())
- ? active_class_->MemberTypeParameterCount(Z)
- : 0;
- if (procedure_type_parameter_count > 0) {
- if (procedure_type_parameter_count > parameter_index) {
- const auto& type_param = TypeParameter::CheckedHandle(
- Z,
- TypeArguments::Handle(Z, active_class_->member->type_parameters())
- .TypeAt(parameter_index));
- result_ = type_param.ToNullability(nullability, Heap::kOld);
- active_class_->RecordDerivedTypeParameter(Z, type_param,
- TypeParameter::Cast(result_));
- if (finalize_) {
- result_ = ClassFinalizer::FinalizeType(result_);
+ parameter_index -= class_types.Length();
+
+ if (active_class_->HasMember()) {
+ if (active_class_->MemberIsFactoryProcedure()) {
+ //
+ // WARNING: This is a little hackish:
+ //
+ // We have a static factory constructor. The kernel IR gives the factory
+ // constructor function its own type parameters (which are equal in name
+ // and number to the ones of the enclosing class). I.e.,
+ //
+ // class A<T> {
+ // factory A.x() { return new B<T>(); }
+ // }
+ //
+ // is basically translated to this:
+ //
+ // class A<T> {
+ // static A.x<T'>() { return new B<T'>(); }
+ // }
+ //
+ if (class_types.Length() > parameter_index) {
+ const auto& type_param = TypeParameter::CheckedHandle(
+ Z, class_types.TypeAt(parameter_index));
+ result_ = type_param.ToNullability(nullability, Heap::kOld);
+ active_class_->RecordDerivedTypeParameter(
+ Z, type_param, TypeParameter::Cast(result_));
+ return;
}
- return;
+ parameter_index -= class_types.Length();
}
- parameter_index -= procedure_type_parameter_count;
+ // Factory function should not be considered as procedure.
+ intptr_t procedure_type_parameter_count =
+ (active_class_->MemberIsProcedure() &&
+ !active_class_->MemberIsFactoryProcedure())
+ ? active_class_->MemberTypeParameterCount(Z)
+ : 0;
+ if (procedure_type_parameter_count > 0) {
+ if (procedure_type_parameter_count > parameter_index) {
+ const auto& type_param = TypeParameter::CheckedHandle(
+ Z,
+ TypeArguments::Handle(Z, active_class_->member->type_parameters())
+ .TypeAt(parameter_index));
+ result_ = type_param.ToNullability(nullability, Heap::kOld);
+ active_class_->RecordDerivedTypeParameter(
+ Z, type_param, TypeParameter::Cast(result_));
+ if (finalize_) {
+ result_ = ClassFinalizer::FinalizeType(result_);
+ }
+ return;
+ }
+ parameter_index -= procedure_type_parameter_count;
+ }
}
}
-
if (active_class_->local_type_parameters != NULL) {
if (parameter_index < active_class_->local_type_parameters->Length()) {
const auto& type_param = TypeParameter::CheckedHandle(
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.h b/runtime/vm/compiler/frontend/kernel_translation_helper.h
index 03e6378..64c5c8d 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.h
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.h
@@ -1460,7 +1460,8 @@
ConstantReader* constant_reader,
ActiveClass* active_class,
bool finalize = false,
- bool apply_canonical_type_erasure = false);
+ bool apply_canonical_type_erasure = false,
+ bool in_constant_context = false);
AbstractType& BuildType();
AbstractType& BuildTypeWithoutFinalization();
@@ -1541,6 +1542,7 @@
AbstractType& result_;
bool finalize_;
const bool apply_canonical_type_erasure_;
+ const bool in_constant_context_;
friend class ScopeBuilder;
friend class KernelLoader;
diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h
index 2e1eee9..29eae67 100644
--- a/runtime/vm/kernel_binary.h
+++ b/runtime/vm/kernel_binary.h
@@ -20,8 +20,8 @@
static const uint32_t kMagicProgramFile = 0x90ABCDEFu;
// Both version numbers are inclusive.
-static const uint32_t kMinSupportedKernelFormatVersion = 59;
-static const uint32_t kMaxSupportedKernelFormatVersion = 59;
+static const uint32_t kMinSupportedKernelFormatVersion = 60;
+static const uint32_t kMaxSupportedKernelFormatVersion = 60;
// Keep in sync with package:kernel/lib/binary/tag.dart
#define KERNEL_TAG_LIST(V) \
diff --git a/tools/VERSION b/tools/VERSION
index 9433708..9f2ecc3 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 13
PATCH 0
-PRERELEASE 185
+PRERELEASE 186
PRERELEASE_PATCH 0
\ No newline at end of file