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

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

Issue 2916333002: Setup correct scope for initializers and complain about fields initialized more than once. (Closed)
Patch Set: More typos. 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_formal_parameter_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart
index fc014eb7748add4aaa5d9ba3a62a75c4159ed2bb..2bd7426315038c1e95c3da23f3e71a0811cef196 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart
@@ -7,6 +7,8 @@ library fasta.kernel_formal_parameter_builder;
import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart'
show KernelVariableDeclaration;
+import '../modifier.dart' show finalMask;
+
import 'kernel_builder.dart'
show
FormalParameterBuilder,
@@ -47,4 +49,14 @@ class KernelFormalParameterBuilder
}
return declaration;
}
+
+ @override
+ FormalParameterBuilder forFormalParameterInitializerScope() {
+ assert(declaration != null);
+ return !hasThis
+ ? this
+ : (new KernelFormalParameterBuilder(metadata, modifiers | finalMask,
+ type, name, hasThis, parent, charOffset)
+ ..declaration = declaration);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698