Index: pkg/compiler/lib/src/library_loader.dart |
diff --git a/pkg/compiler/lib/src/library_loader.dart b/pkg/compiler/lib/src/library_loader.dart |
index 71bfd9fdd8957e6662ecce48c7b47dcf3a400458..f0b296b1581b9663c8886a416fb63127667a9264 100644 |
--- a/pkg/compiler/lib/src/library_loader.dart |
+++ b/pkg/compiler/lib/src/library_loader.dart |
@@ -610,6 +610,19 @@ class _LibraryLoaderTask extends CompilerTask implements LibraryLoaderTask { |
if (script == null) return null; |
LibraryElement element = |
createLibrarySync(handler, script, resolvedUri); |
+ CompilationUnitElementX compilationUnit = element.entryCompilationUnit; |
+ if (compilationUnit.partTag != null) { |
+ DiagnosticMessage error = reporter.withCurrentElement( |
+ compilationUnit, |
+ () => reporter.createMessage( |
+ compilationUnit.partTag, MessageKind.IMPORT_PART_OF)); |
+ DiagnosticMessage info = reporter.withCurrentElement( |
+ importingLibrary, |
+ () => reporter.createMessage( |
+ node, |
+ MessageKind.IMPORT_PART_OF_HERE)); |
+ reporter.reportError(error, <DiagnosticMessage>[info]); |
+ } |
return processLibraryTags(handler, element).then((_) { |
reporter.withCurrentElement(element, () { |
handler.registerLibraryExports(element); |