| Index: sdk/lib/_internal/compiler/implementation/library_loader.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/library_loader.dart b/sdk/lib/_internal/compiler/implementation/library_loader.dart
|
| index 6a247e209c633f2df7c821a03215fdccb00968a8..359aa435f4b7bc7a141e8c8eb74715c9f462d1a0 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/library_loader.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/library_loader.dart
|
| @@ -173,12 +173,11 @@ class LibraryLoaderTask extends LibraryLoader {
|
| Uri base = library.entryCompilationUnit.script.uri;
|
| for (LibraryTag tag in library.tags.reverse()) {
|
| if (tag.isImport) {
|
| - Import import = tag;
|
| - tagState = checkTag(TagState.IMPORT_OR_EXPORT, import);
|
| - if (import.uri.dartString.slowToString() == 'dart:core') {
|
| + tagState = checkTag(TagState.IMPORT_OR_EXPORT, tag);
|
| + if (tag.uri.dartString.slowToString() == 'dart:core') {
|
| importsDartCore = true;
|
| }
|
| - libraryDependencies.addLast(import);
|
| + libraryDependencies.addLast(tag);
|
| } else if (tag.isExport) {
|
| tagState = checkTag(TagState.IMPORT_OR_EXPORT, tag);
|
| libraryDependencies.addLast(tag);
|
| @@ -191,11 +190,10 @@ class LibraryLoaderTask extends LibraryLoader {
|
| }
|
| checkDuplicatedLibraryName(library);
|
| } else if (tag.isPart) {
|
| - Part part = tag;
|
| - StringNode uri = part.uri;
|
| + StringNode uri = tag.uri;
|
| Uri resolved = base.resolve(uri.dartString.slowToString());
|
| - tagState = checkTag(TagState.SOURCE, part);
|
| - scanPart(part, resolved, library);
|
| + tagState = checkTag(TagState.SOURCE, tag);
|
| + scanPart(tag, resolved, library);
|
| } else {
|
| compiler.internalError("Unhandled library tag.", node: tag);
|
| }
|
| @@ -548,16 +546,8 @@ class LibraryDependencyNode {
|
| SourceString name = element.name;
|
| Element existingElement = exportScope[name];
|
| if (existingElement != null) {
|
| - if (existingElement.isErroneous()) {
|
| - compiler.reportMessage(compiler.spanFromElement(element),
|
| - MessageKind.DUPLICATE_EXPORT.error([name]), api.Diagnostic.ERROR);
|
| - element = existingElement;
|
| - } else if (existingElement.getLibrary() != library) {
|
| + if (existingElement.getLibrary() != library) {
|
| // Declared elements hide exported elements.
|
| - compiler.reportMessage(compiler.spanFromElement(existingElement),
|
| - MessageKind.DUPLICATE_EXPORT.error([name]), api.Diagnostic.ERROR);
|
| - compiler.reportMessage(compiler.spanFromElement(element),
|
| - MessageKind.DUPLICATE_EXPORT.error([name]), api.Diagnostic.ERROR);
|
| element = exportScope[name] = new ErroneousElement(
|
| MessageKind.DUPLICATE_EXPORT, [name], name, library);
|
| }
|
|
|