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

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

Issue 2934713002: Various issues with duplicated names. (Closed)
Patch Set: Created 3 years, 6 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 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(

Powered by Google App Engine
This is Rietveld 408576698