| Index: compiler/java/com/google/dart/compiler/DartCompiler.java
|
| diff --git a/compiler/java/com/google/dart/compiler/DartCompiler.java b/compiler/java/com/google/dart/compiler/DartCompiler.java
|
| index dd85e0b109ce94f4687c1b3210255d64f2e9e1f0..0639e82754e44d1d9b8c7aab1822e5e9684ce8cd 100644
|
| --- a/compiler/java/com/google/dart/compiler/DartCompiler.java
|
| +++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
|
| @@ -620,6 +620,15 @@ public class DartCompiler {
|
| continue;
|
| }
|
|
|
| + // Validate import prefixes.
|
| + for (LibraryNode importNode : lib.getImportPaths()) {
|
| + String prefix = importNode.getPrefix();
|
| + if (DartParser.PSEUDO_KEYWORDS_SET.contains(prefix)) {
|
| + context.onError(new DartCompilationError(importNode.getSourceInfo(),
|
| + ResolverErrorCode.BUILT_IN_IDENTIFIER_AS_IMPORT_PREFIX, prefix));
|
| + }
|
| + }
|
| +
|
| // check that each imported library has a library directive
|
| for (LibraryUnit importedLib : lib.getImports()) {
|
|
|
|
|