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 5e132003d7678dfcc2cc5c541046d2180b065513..67b1641eb54096ecddd22fd2484e38a66bd444fd 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 |
@@ -545,6 +545,7 @@ class KernelLibraryBuilder |
charEndOffset, |
nativeMethodName); |
} |
+ checkTypeVariables(typeVariables, procedure); |
addBuilder(name, procedure, charOffset); |
if (nativeMethodName != null) { |
addNativeMethod(procedure); |
@@ -612,6 +613,7 @@ class KernelLibraryBuilder |
int charOffset) { |
FunctionTypeAliasBuilder typedef = new KernelFunctionTypeAliasBuilder( |
metadata, returnType, name, typeVariables, formals, this, charOffset); |
+ checkTypeVariables(typeVariables, typedef); |
// Nested declaration began in `OutlineBuilder.beginFunctionTypeAlias`. |
endNestedDeclaration().resolveTypes(typeVariables, this); |
addBuilder(name, typedef, charOffset); |
@@ -622,8 +624,10 @@ class KernelLibraryBuilder |
List<TypeVariableBuilder> typeVariables, |
List<FormalParameterBuilder> formals, |
int charOffset) { |
- return addType(new KernelFunctionTypeBuilder( |
- charOffset, fileUri, returnType, typeVariables, formals)); |
+ var builder = new KernelFunctionTypeBuilder( |
+ charOffset, fileUri, returnType, typeVariables, formals); |
+ checkTypeVariables(typeVariables, builder); |
+ return addType(builder); |
} |
KernelFormalParameterBuilder addFormalParameter( |