Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: compiler/java/com/google/dart/compiler/DartCompiler.java

Issue 11549028: Issue 6971. Fixes for using built-in identifier as import prefix. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/parser/DartParser.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5deca30837677caf68962202055b0d3ce87d6c2c..9e1995da296ca039a928554a55d5c3a9f790d2c1 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -607,7 +607,6 @@ public class DartCompiler {
boolean hasHTML = false;
for (LibraryNode importNode : lib.getImportPaths()) {
String libSpec = importNode.getText();
- String prefix = importNode.getPrefix();
hasIO |= "dart:io".equals(libSpec);
hasHTML |= "dart:html".equals(libSpec);
// "dart:mirrors" are not done yet
@@ -615,11 +614,6 @@ public class DartCompiler {
context.onError(new DartCompilationError(importNode,
DartCompilerErrorCode.MIRRORS_NOT_FULLY_IMPLEMENTED));
}
- // validate import prefix
- if (DartParser.PSEUDO_KEYWORDS_SET.contains(prefix)) {
- context.onError(new DartCompilationError(importNode.getSourceInfo(),
- ResolverErrorCode.BUILT_IN_IDENTIFIER_AS_IMPORT_PREFIX, prefix));
- }
// validate console/web mix
if (hasIO && hasHTML) {
context.onError(new DartCompilationError(importNode.getSourceInfo(),
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/parser/DartParser.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698