Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart

Issue 2967923002: Use type variables on Typedef correctly. (Closed)
Patch Set: Fix NPE and change compile-time error to warning. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
index 1a20d1592036e506b6ca6a041429c0ba7719fa5d..17a4e289a8d7bb4f4bba1a25d149400d400d0e61 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
@@ -32,7 +32,6 @@ import 'kernel_builder.dart'
ClassBuilder,
ConstructorReferenceBuilder,
FormalParameterBuilder,
- FunctionTypeAliasBuilder,
InvalidTypeBuilder,
KernelConstructorBuilder,
KernelEnumBuilder,
@@ -613,13 +612,12 @@ class KernelLibraryBuilder
void addFunctionTypeAlias(
List<MetadataBuilder> metadata,
- KernelTypeBuilder returnType,
String name,
List<TypeVariableBuilder> typeVariables,
- List<FormalParameterBuilder> formals,
+ covariant KernelFunctionTypeBuilder type,
int charOffset) {
- FunctionTypeAliasBuilder typedef = new KernelFunctionTypeAliasBuilder(
- metadata, returnType, name, typeVariables, formals, this, charOffset);
+ KernelFunctionTypeAliasBuilder typedef = new KernelFunctionTypeAliasBuilder(
+ metadata, name, typeVariables, type, this, charOffset);
checkTypeVariables(typeVariables, typedef);
// Nested declaration began in `OutlineBuilder.beginFunctionTypeAlias`.
endNestedDeclaration("#typedef").resolveTypes(typeVariables, this);
@@ -634,6 +632,9 @@ class KernelLibraryBuilder
var builder = new KernelFunctionTypeBuilder(
charOffset, fileUri, returnType, typeVariables, formals);
checkTypeVariables(typeVariables, builder);
+ // Nested declaration began in `OutlineBuilder.beginFunctionType` or
+ // `OutlineBuilder.beginFunctionTypedFormalParameter`.
+ endNestedDeclaration("#function_type").resolveTypes(typeVariables, this);
return addType(builder);
}

Powered by Google App Engine
This is Rietveld 408576698