Index: sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
index 63ab7922f52d33f07af460dbb15d55a3fc985df9..834026694f93d2c8e905558971fd606a18952a78 100644 |
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
@@ -606,10 +606,7 @@ class CompilationUnitElementX extends ElementX |
void setPartOf(PartOf tag, DiagnosticListener listener) { |
LibraryElementX library = enclosingElement; |
if (library.entryCompilationUnit == this) { |
- listener.reportMessage( |
- listener.spanFromSpannable(tag), |
- MessageKind.ILLEGAL_DIRECTIVE.error(), |
- api.Diagnostic.WARNING); |
+ listener.reportError(tag, MessageKind.ILLEGAL_DIRECTIVE); |
return; |
} |
if (!localMembers.isEmpty) { |