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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 140803002: Perform override and inheritance checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library elements.modelx; 5 library elements.modelx;
6 6
7 import 'elements.dart'; 7 import 'elements.dart';
8 import '../../compiler.dart' as api; 8 import '../../compiler.dart' as api;
9 import '../tree/tree.dart'; 9 import '../tree/tree.dart';
10 import '../util/util.dart'; 10 import '../util/util.dart';
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 if (enclosingElement.isPatch) { 599 if (enclosingElement.isPatch) {
600 getImplementationLibrary().addMember(element, listener); 600 getImplementationLibrary().addMember(element, listener);
601 } else { 601 } else {
602 getLibrary().addMember(element, listener); 602 getLibrary().addMember(element, listener);
603 } 603 }
604 } 604 }
605 605
606 void setPartOf(PartOf tag, DiagnosticListener listener) { 606 void setPartOf(PartOf tag, DiagnosticListener listener) {
607 LibraryElementX library = enclosingElement; 607 LibraryElementX library = enclosingElement;
608 if (library.entryCompilationUnit == this) { 608 if (library.entryCompilationUnit == this) {
609 listener.reportMessage( 609 listener.reportError(tag, MessageKind.ILLEGAL_DIRECTIVE);
610 listener.spanFromSpannable(tag),
611 MessageKind.ILLEGAL_DIRECTIVE.error(),
612 api.Diagnostic.WARNING);
613 return; 610 return;
614 } 611 }
615 if (!localMembers.isEmpty) { 612 if (!localMembers.isEmpty) {
616 listener.reportError(tag, MessageKind.BEFORE_TOP_LEVEL); 613 listener.reportError(tag, MessageKind.BEFORE_TOP_LEVEL);
617 return; 614 return;
618 } 615 }
619 if (partTag != null) { 616 if (partTag != null) {
620 listener.reportMessage( 617 listener.reportMessage(
621 listener.spanFromSpannable(tag), 618 listener.spanFromSpannable(tag),
622 MessageKind.DUPLICATED_PART_OF.error(), 619 MessageKind.DUPLICATED_PART_OF.error(),
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
2464 2461
2465 MetadataAnnotation ensureResolved(Compiler compiler) { 2462 MetadataAnnotation ensureResolved(Compiler compiler) {
2466 if (resolutionState == STATE_NOT_STARTED) { 2463 if (resolutionState == STATE_NOT_STARTED) {
2467 compiler.resolver.resolveMetadataAnnotation(this); 2464 compiler.resolver.resolveMetadataAnnotation(this);
2468 } 2465 }
2469 return this; 2466 return this;
2470 } 2467 }
2471 2468
2472 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 2469 String toString() => 'MetadataAnnotation($value, $resolutionState)';
2473 } 2470 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698