Index: pkg/compiler/lib/src/native/scanner.dart |
diff --git a/pkg/compiler/lib/src/native/scanner.dart b/pkg/compiler/lib/src/native/scanner.dart |
index a5d72f3b4f4e84cb91f27f9bd9559bcfeb3cf4f1..bbbbb2eaf69a7a70870a97ff2a359418b138f453 100644 |
--- a/pkg/compiler/lib/src/native/scanner.dart |
+++ b/pkg/compiler/lib/src/native/scanner.dart |
@@ -6,9 +6,8 @@ part of native; |
void checkAllowedLibrary(ElementListener listener, Token token) { |
LibraryElement currentLibrary = listener.compilationUnitElement.library; |
- if (!currentLibrary.canUseNative) { |
- listener.recoverableError(token, "Unexpected token"); |
- } |
+ if (currentLibrary.canUseNative) return; |
+ listener.reportError(token, MessageKind.NATIVE_NOT_SUPPORTED); |
} |
Token handleNativeBlockToSkip(Listener listener, Token token) { |