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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/immutable_nested_closure_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 AnalyzableElement get analyzedElement; 8 AnalyzableElement get analyzedElement;
9 Iterable<Node> get superUses; 9 Iterable<Node> get superUses;
10 10
(...skipping 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 MessageKind.NAMED_FUNCTION_EXPRESSION, 2490 MessageKind.NAMED_FUNCTION_EXPRESSION,
2491 {'name': node.name}); 2491 {'name': node.name});
2492 } 2492 }
2493 visit(node.returnType); 2493 visit(node.returnType);
2494 String name; 2494 String name;
2495 if (node.name == null) { 2495 if (node.name == null) {
2496 name = ""; 2496 name = "";
2497 } else { 2497 } else {
2498 name = node.name.asIdentifier().source; 2498 name = node.name.asIdentifier().source;
2499 } 2499 }
2500 Modifiers modifiers = node.name == null
2501 ? Modifiers.EMPTY
2502 : new Modifiers.withFlags(new NodeList.empty(), Modifiers.FLAG_FINAL);
2500 LocalFunctionElementX function = new LocalFunctionElementX( 2503 LocalFunctionElementX function = new LocalFunctionElementX(
2501 name, node, ElementKind.FUNCTION, Modifiers.EMPTY, 2504 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
2502 enclosingElement);
2503 ResolverTask.processAsyncMarker(compiler, function, registry); 2505 ResolverTask.processAsyncMarker(compiler, function, registry);
2504 function.functionSignatureCache = SignatureResolver.analyze( 2506 function.functionSignatureCache = SignatureResolver.analyze(
2505 compiler, 2507 compiler,
2506 node.parameters, 2508 node.parameters,
2507 node.returnType, 2509 node.returnType,
2508 function, 2510 function,
2509 registry, 2511 registry,
2510 createRealParameters: true, 2512 createRealParameters: true,
2511 isFunctionExpression: !inFunctionDeclaration); 2513 isFunctionExpression: !inFunctionDeclaration);
2512 checkLocalDefinitionName(node, function); 2514 checkLocalDefinitionName(node, function);
(...skipping 2564 matching lines...) Expand 10 before | Expand all | Expand 10 after
5077 } 5079 }
5078 5080
5079 /// The result for the resolution of the `assert` method. 5081 /// The result for the resolution of the `assert` method.
5080 class AssertResult implements ResolutionResult { 5082 class AssertResult implements ResolutionResult {
5081 const AssertResult(); 5083 const AssertResult();
5082 5084
5083 Element get element => null; 5085 Element get element => null;
5084 5086
5085 String toString() => 'AssertResult()'; 5087 String toString() => 'AssertResult()';
5086 } 5088 }
OLDNEW
« 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