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

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

Issue 10139017: Support for same prefix for multiple imports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Detect top-level duplicates in libraries with same prefix Created 8 years, 8 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/Resolver.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
index 6723886ed26823572aa2cc15210654a3d58ec17e..5cb6080e80291068e546b00c248ff65bb1da85e2 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -1127,9 +1127,9 @@ public class Resolver {
}
break;
- case LIBRARY:
- // Library prefix, lookup the element in the reference library.
- Scope scope = ((LibraryElement) qualifier).getScope();
+ case LIBRARY_PREFIX:
+ // Library prefix, lookup the element in the referenced library.
+ Scope scope = ((LibraryPrefixElement) qualifier).getScope();
element = scope.findElement(scope.getLibrary(), x.getPropertyName());
if (element == null) {
onError(x, ResolverErrorCode.CANNOT_BE_RESOLVED_LIBRARY,
@@ -1187,9 +1187,9 @@ public class Resolver {
break;
}
- case LIBRARY:
+ case LIBRARY_PREFIX:
// Library prefix, lookup the element in the reference library.
- LibraryElement library = ((LibraryElement) target);
+ LibraryPrefixElement library = ((LibraryPrefixElement) target);
element = library.getScope().findElement(context.getScope().getLibrary(),
x.getFunctionNameString());
if (element == null) {

Powered by Google App Engine
This is Rietveld 408576698