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

Unified Diff: compiler/java/com/google/dart/compiler/ast/LibraryUnit.java

Issue 11226010: Issue 6073. Fixes for 'export'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/ast/LibraryUnit.java
diff --git a/compiler/java/com/google/dart/compiler/ast/LibraryUnit.java b/compiler/java/com/google/dart/compiler/ast/LibraryUnit.java
index f5b0d3f24861449781366c328a411938643400c7..d6e2a3153b2d3b33c7ded6cc0856aef82926d951 100644
--- a/compiler/java/com/google/dart/compiler/ast/LibraryUnit.java
+++ b/compiler/java/com/google/dart/compiler/ast/LibraryUnit.java
@@ -164,7 +164,13 @@ public class LibraryUnit {
}
public boolean hasImport(LibraryUnit unit) {
- return imports.contains(new LibraryImport(unit, null, ImmutableList.<ImportCombinator> of()));
+ for (LibraryImport libraryImport : imports) {
+ if (libraryImport.getPrefix() == null && Objects.equal(libraryImport.getLibrary(), unit)) {
+ return true;
+ }
+ }
+ return false;
+// return imports.contains(new LibraryImport(unit, null, ImmutableList.<ImportCombinator> of()));
}
public DartExpression getEntryPoint() {

Powered by Google App Engine
This is Rietveld 408576698