Index: pkg/compiler/lib/src/elements/modelx.dart |
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart |
index 95b2b2abbe54df58354e06de7ce56be387ff25b4..5549f452cd072ede9403d4ac61cf04e29113fce2 100644 |
--- a/pkg/compiler/lib/src/elements/modelx.dart |
+++ b/pkg/compiler/lib/src/elements/modelx.dart |
@@ -785,9 +785,9 @@ class CompilationUnitElementX extends ElementX |
void setPartOf(PartOf tag, DiagnosticReporter reporter) { |
LibraryElementX library = enclosingElement; |
if (library.entryCompilationUnit == this) { |
+ // This compilation unit is loaded as a library. The error is reported by |
+ // the library loader. |
partTag = tag; |
- reporter.reportErrorMessage( |
- tag, MessageKind.IMPORT_PART_OF); |
return; |
} |
if (!localMembers.isEmpty) { |