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

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

Issue 11879039: Fix error message for library name mismatch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 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 | tests/compiler/dart2js/mock_compiler.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 'dart:uri'; 7 import 'dart:uri';
8 8
9 import 'elements.dart'; 9 import 'elements.dart';
10 import '../../compiler.dart' as api; 10 import '../../compiler.dart' as api;
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 if (partTag != null) { 500 if (partTag != null) {
501 listener.reportMessage( 501 listener.reportMessage(
502 listener.spanFromSpannable(tag), 502 listener.spanFromSpannable(tag),
503 MessageKind.DUPLICATED_PART_OF.error(), 503 MessageKind.DUPLICATED_PART_OF.error(),
504 api.Diagnostic.WARNING); 504 api.Diagnostic.WARNING);
505 return; 505 return;
506 } 506 }
507 partTag = tag; 507 partTag = tag;
508 LibraryName libraryTag = getLibrary().libraryTag; 508 LibraryName libraryTag = getLibrary().libraryTag;
509 if (libraryTag != null) { 509 if (libraryTag != null) {
510 String expectedName = tag.name.toString(); 510 String actualName = tag.name.toString();
511 String actualName = libraryTag.name.toString(); 511 String expectedName = libraryTag.name.toString();
512 if (expectedName != actualName) { 512 if (expectedName != actualName) {
513 listener.reportMessage( 513 listener.reportMessage(
514 listener.spanFromSpannable(tag.name), 514 listener.spanFromSpannable(tag.name),
515 MessageKind.LIBRARY_NAME_MISMATCH.error([expectedName]), 515 MessageKind.LIBRARY_NAME_MISMATCH.error([expectedName]),
516 api.Diagnostic.WARNING); 516 api.Diagnostic.WARNING);
517 } 517 }
518 } 518 }
519 } 519 }
520 520
521 bool get hasMembers => !localMembers.isEmpty; 521 bool get hasMembers => !localMembers.isEmpty;
(...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1967 1967
1968 MetadataAnnotation ensureResolved(Compiler compiler) { 1968 MetadataAnnotation ensureResolved(Compiler compiler) {
1969 if (resolutionState == STATE_NOT_STARTED) { 1969 if (resolutionState == STATE_NOT_STARTED) {
1970 compiler.resolver.resolveMetadataAnnotation(this); 1970 compiler.resolver.resolveMetadataAnnotation(this);
1971 } 1971 }
1972 return this; 1972 return this;
1973 } 1973 }
1974 1974
1975 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 1975 String toString() => 'MetadataAnnotation($value, $resolutionState)';
1976 } 1976 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698