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

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

Issue 837473002: Improve message for import of part. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/warnings.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) 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 '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../helpers/helpers.dart'; // Included for debug helpers. 9 import '../helpers/helpers.dart'; // Included for debug helpers.
10 import '../tree/tree.dart'; 10 import '../tree/tree.dart';
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 if (enclosingElement.isPatch) { 556 if (enclosingElement.isPatch) {
557 implementationLibrary.addMember(element, listener); 557 implementationLibrary.addMember(element, listener);
558 } else { 558 } else {
559 library.addMember(element, listener); 559 library.addMember(element, listener);
560 } 560 }
561 } 561 }
562 562
563 void setPartOf(PartOf tag, DiagnosticListener listener) { 563 void setPartOf(PartOf tag, DiagnosticListener listener) {
564 LibraryElementX library = enclosingElement; 564 LibraryElementX library = enclosingElement;
565 if (library.entryCompilationUnit == this) { 565 if (library.entryCompilationUnit == this) {
566 listener.reportError(tag, MessageKind.ILLEGAL_DIRECTIVE); 566 listener.reportError(tag, MessageKind.IMPORT_PART_OF);
567 return; 567 return;
568 } 568 }
569 if (!localMembers.isEmpty) { 569 if (!localMembers.isEmpty) {
570 listener.reportError(tag, MessageKind.BEFORE_TOP_LEVEL); 570 listener.reportError(tag, MessageKind.BEFORE_TOP_LEVEL);
571 return; 571 return;
572 } 572 }
573 if (partTag != null) { 573 if (partTag != null) {
574 listener.reportWarning(tag, MessageKind.DUPLICATED_PART_OF); 574 listener.reportWarning(tag, MessageKind.DUPLICATED_PART_OF);
575 return; 575 return;
576 } 576 }
(...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after
2825 AstElement get definingElement; 2825 AstElement get definingElement;
2826 2826
2827 bool get hasResolvedAst => definingElement.hasTreeElements; 2827 bool get hasResolvedAst => definingElement.hasTreeElements;
2828 2828
2829 ResolvedAst get resolvedAst { 2829 ResolvedAst get resolvedAst {
2830 return new ResolvedAst(declaration, 2830 return new ResolvedAst(declaration,
2831 definingElement.node, definingElement.treeElements); 2831 definingElement.node, definingElement.treeElements);
2832 } 2832 }
2833 2833
2834 } 2834 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698