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

Unified Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 1073983003: Make invalid to override method names for local nested functions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/immutable_nested_closure_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/members.dart
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index 652387b9ab146828326a32ce5cdb473311b9a15c..49d3c1ff589954e8e8cd4ecbafb37e9931b1fba6 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -2497,9 +2497,11 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
} else {
name = node.name.asIdentifier().source;
}
+ Modifiers modifiers = node.name == null
+ ? Modifiers.EMPTY
+ : new Modifiers.withFlags(new NodeList.empty(), Modifiers.FLAG_FINAL);
LocalFunctionElementX function = new LocalFunctionElementX(
- name, node, ElementKind.FUNCTION, Modifiers.EMPTY,
- enclosingElement);
+ name, node, ElementKind.FUNCTION, modifiers, enclosingElement);
Johnni Winther 2015/04/10 11:49:43 The .isFinal property means 'declaratively final'
Siggi Cherem (dart-lang) 2015/04/11 00:12:21 thanks, I was not very keen of this approach, but
ResolverTask.processAsyncMarker(compiler, function, registry);
function.functionSignatureCache = SignatureResolver.analyze(
compiler,
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/immutable_nested_closure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698