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

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/co19/co19-dart2js.status » ('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 2993 matching lines...) Expand 10 before | Expand all | Expand 10 after
3004 } 3004 }
3005 if (isComplex && getter == null && !inInstanceContext) { 3005 if (isComplex && getter == null && !inInstanceContext) {
3006 getter = reportAndCreateErroneousElement(node.selector, field.name, 3006 getter = reportAndCreateErroneousElement(node.selector, field.name,
3007 MessageKind.CANNOT_RESOLVE_GETTER, const {}); 3007 MessageKind.CANNOT_RESOLVE_GETTER, const {});
3008 registry.registerThrowNoSuchMethod(); 3008 registry.registerThrowNoSuchMethod();
3009 } 3009 }
3010 } else if (target.impliesType) { 3010 } else if (target.impliesType) {
3011 setter = reportAndCreateErroneousElement(node.selector, target.name, 3011 setter = reportAndCreateErroneousElement(node.selector, target.name,
3012 MessageKind.ASSIGNING_TYPE, const {}); 3012 MessageKind.ASSIGNING_TYPE, const {});
3013 registry.registerThrowNoSuchMethod(); 3013 registry.registerThrowNoSuchMethod();
3014 } else if (target.isFinal || 3014 } else if (target.isFinal || target.isConst) {
3015 target.isConst || 3015 setter = reportAndCreateErroneousElement(
3016 (target.isFunction && 3016 node.selector, target.name, MessageKind.CANNOT_RESOLVE_SETTER,
3017 Elements.isStaticOrTopLevelFunction(target) && 3017 const {});
3018 !target.isSetter)) {
3019 if (target.isFunction) {
3020 setter = reportAndCreateErroneousElement(node.selector, target.name,
3021 MessageKind.ASSIGNING_METHOD, const {});
3022 } else {
3023 setter = reportAndCreateErroneousElement(node.selector, target.name,
3024 MessageKind.CANNOT_RESOLVE_SETTER, const {});
3025 }
3026 registry.registerThrowNoSuchMethod(); 3018 registry.registerThrowNoSuchMethod();
3019 } else if (target.isFunction && target.name != '[]=') {
3020 assert(!target.isSetter);
3021 setter = reportAndCreateErroneousElement(
3022 node.selector, target.name, MessageKind.ASSIGNING_METHOD, const {});
3023 registry.registerThrowNoSuchMethod();
3024 if (node.isSuperCall) registry.registerSuperNoSuchMethod();
3027 } 3025 }
3028 if (isPotentiallyMutableTarget(target)) { 3026 if (isPotentiallyMutableTarget(target)) {
3029 registry.registerPotentialMutation(target, node); 3027 registry.registerPotentialMutation(target, node);
3030 if (enclosingElement != target.enclosingElement) { 3028 if (enclosingElement != target.enclosingElement) {
3031 registry.registerPotentialMutationInClosure(target, node); 3029 registry.registerPotentialMutationInClosure(target, node);
3032 } 3030 }
3033 for (Node scope in promotionScope) { 3031 for (Node scope in promotionScope) {
3034 registry.registerPotentialMutationIn(scope, target, node); 3032 registry.registerPotentialMutationIn(scope, target, node);
3035 } 3033 }
3036 } 3034 }
(...skipping 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after
5113 } 5111 }
5114 5112
5115 /// The result for the resolution of the `assert` method. 5113 /// The result for the resolution of the `assert` method.
5116 class AssertResult implements ResolutionResult { 5114 class AssertResult implements ResolutionResult {
5117 const AssertResult(); 5115 const AssertResult();
5118 5116
5119 Element get element => null; 5117 Element get element => null;
5120 5118
5121 String toString() => 'AssertResult()'; 5119 String toString() => 'AssertResult()';
5122 } 5120 }
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698