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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 11464025: dart2js: complain about missing part-of tags. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years 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
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 Element operator[](Node node); 8 Element operator[](Node node);
9 Selector getSelector(Send send); 9 Selector getSelector(Send send);
10 DartType getType(Node node); 10 DartType getType(Node node);
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 511
512 SourceString name = 512 SourceString name =
513 Elements.deconstructConstructorName(member.name, holder); 513 Elements.deconstructConstructorName(member.name, holder);
514 514
515 // If the name could not be deconstructed, this is is from a 515 // If the name could not be deconstructed, this is is from a
516 // factory method from a deprecated interface implementation. 516 // factory method from a deprecated interface implementation.
517 if (name == null) return; 517 if (name == null) return;
518 518
519 Element otherMember = holder.lookupLocalMember(name); 519 Element otherMember = holder.lookupLocalMember(name);
520 if (otherMember != null) { 520 if (otherMember != null) {
521 compiler.onDeprecatedFeature(member, 'conflicting constructor'); 521 if (compiler.onDeprecatedFeature(member, 'conflicting constructor')) {
522 compiler.reportMessage( 522 compiler.reportMessage(
523 compiler.spanFromElement(otherMember), 523 compiler.spanFromElement(otherMember),
524 MessageKind.GENERIC.error(['This member conflicts with a' 524 MessageKind.GENERIC.error(['This member conflicts with a'
525 ' constructor.']), 525 ' constructor.']),
526 Diagnostic.INFO); 526 Diagnostic.INFO);
527 }
527 } 528 }
528 } 529 }
529 530
530 void checkAbstractField(Element member) { 531 void checkAbstractField(Element member) {
531 // Only check for getters. The test can only fail if there is both a setter 532 // Only check for getters. The test can only fail if there is both a setter
532 // and a getter with the same name, and we only need to check each abstract 533 // and a getter with the same name, and we only need to check each abstract
533 // field once, so we just ignore setters. 534 // field once, so we just ignore setters.
534 if (!member.isGetter()) return; 535 if (!member.isGetter()) return;
535 536
536 // Find the associated abstract field. 537 // Find the associated abstract field.
(...skipping 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after
3261 return e; 3262 return e;
3262 } 3263 }
3263 3264
3264 /// Assumed to be called by [resolveRedirectingFactory]. 3265 /// Assumed to be called by [resolveRedirectingFactory].
3265 Element visitReturn(Return node) { 3266 Element visitReturn(Return node) {
3266 Node expression = node.expression; 3267 Node expression = node.expression;
3267 return finishConstructorReference(visit(expression), 3268 return finishConstructorReference(visit(expression),
3268 expression, expression); 3269 expression, expression);
3269 } 3270 }
3270 } 3271 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698