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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java

Issue 10545131: Issue 3531. Don't allow using built-in identifier as import prefix (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 months 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
Index: compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java b/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java
index 07abae93c7bc0f9659ce7f98e092a570ae91b643..ceaa58e9aa741bcd98cb195b98f65ed89ce573ed 100644
--- a/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java
+++ b/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java
@@ -16,13 +16,17 @@ import com.google.dart.compiler.ast.DartField;
import com.google.dart.compiler.ast.DartFieldDefinition;
import com.google.dart.compiler.ast.DartFunctionTypeAlias;
import com.google.dart.compiler.ast.DartIdentifier;
+import com.google.dart.compiler.ast.DartImportDirective;
import com.google.dart.compiler.ast.DartMethodDefinition;
import com.google.dart.compiler.ast.DartNode;
+import com.google.dart.compiler.ast.DartStringLiteral;
import com.google.dart.compiler.ast.DartTypeParameter;
import com.google.dart.compiler.ast.DartUnit;
+import com.google.dart.compiler.ast.LibraryNode;
import com.google.dart.compiler.ast.LibraryUnit;
import com.google.dart.compiler.ast.Modifiers;
import com.google.dart.compiler.common.SourceInfo;
+import com.google.dart.compiler.parser.DartParser;
import com.google.dart.compiler.type.Type;
import com.google.dart.compiler.type.TypeVariable;
import com.google.dart.compiler.type.Types;
@@ -63,7 +67,7 @@ public class TopLevelElementBuilder {
Scope importScope = library.getElement().getImportScope();
Scope scope = library.getElement().getScope();
assert scope.getElements().isEmpty();
-
+
Brian Wilkerson 2012/06/12 15:20:02 nit: trailing whitespace
scheglov 2012/06/12 18:04:22 Done.
Map<String, LibraryPrefixElement> libraryPrefixElements = Maps.newHashMap();
for (LibraryUnit lib : library.getImports()) {
String prefix = library.getPrefixOf(lib);

Powered by Google App Engine
This is Rietveld 408576698