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

Side by Side Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 1511533002: Show import for import of parts. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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
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 '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show 8 import '../common/resolution.dart' show
9 Resolution, 9 Resolution,
10 Parsing; 10 Parsing;
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 if (enclosingElement.isPatch) { 778 if (enclosingElement.isPatch) {
779 implementationLibrary.addMember(element, reporter); 779 implementationLibrary.addMember(element, reporter);
780 } else { 780 } else {
781 library.addMember(element, reporter); 781 library.addMember(element, reporter);
782 } 782 }
783 } 783 }
784 784
785 void setPartOf(PartOf tag, DiagnosticReporter reporter) { 785 void setPartOf(PartOf tag, DiagnosticReporter reporter) {
786 LibraryElementX library = enclosingElement; 786 LibraryElementX library = enclosingElement;
787 if (library.entryCompilationUnit == this) { 787 if (library.entryCompilationUnit == this) {
788 // This compilation unit is loaded as a library. The error is reported by
789 // the library loader.
788 partTag = tag; 790 partTag = tag;
789 reporter.reportErrorMessage(
790 tag, MessageKind.IMPORT_PART_OF);
791 return; 791 return;
792 } 792 }
793 if (!localMembers.isEmpty) { 793 if (!localMembers.isEmpty) {
794 reporter.reportErrorMessage( 794 reporter.reportErrorMessage(
795 tag, MessageKind.BEFORE_TOP_LEVEL); 795 tag, MessageKind.BEFORE_TOP_LEVEL);
796 return; 796 return;
797 } 797 }
798 if (partTag != null) { 798 if (partTag != null) {
799 reporter.reportWarningMessage(tag, MessageKind.DUPLICATED_PART_OF); 799 reporter.reportWarningMessage(tag, MessageKind.DUPLICATED_PART_OF);
800 return; 800 return;
(...skipping 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after
3190 AstElement get definingElement; 3190 AstElement get definingElement;
3191 3191
3192 bool get hasResolvedAst => definingElement.hasTreeElements; 3192 bool get hasResolvedAst => definingElement.hasTreeElements;
3193 3193
3194 ResolvedAst get resolvedAst { 3194 ResolvedAst get resolvedAst {
3195 return new ResolvedAst(declaration, 3195 return new ResolvedAst(declaration,
3196 definingElement.node, definingElement.treeElements); 3196 definingElement.node, definingElement.treeElements);
3197 } 3197 }
3198 3198
3199 } 3199 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/diagnostics/messages.dart ('k') | pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698