Index: compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java |
diff --git a/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java b/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java |
index 47c980ef69340cdb6b4406dbbc6c3327ad23257c..1e4f541773ff8b5463842ad60bc52e1f79b1fd73 100644 |
--- a/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java |
+++ b/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java |
@@ -90,7 +90,17 @@ public class LibraryDepsVisitor extends DartNodeTraverser<Void> { |
@Override |
public Void visitPropertyAccess(DartPropertyAccess node) { |
- // Skip rhs of property accesses, so that all identifiers we visit will be unqualified. |
+ if (node.getQualifier() instanceof DartIdentifier) { |
+ DartIdentifier qualifier = (DartIdentifier) node.getQualifier(); |
+ Element target = qualifier.getTargetSymbol(); |
+ if (target != null && target.getKind() == ElementKind.LIBRARY) { |
+ // Handle library prefixes normally (the prefix part of the qualifier |
+ // doesn't contain any resolvable library source info) |
+ return super.visitPropertyAccess(node); |
+ } |
+ } |
+ // Skip rhs of property accesses, so that all identifiers we visit will be |
+ // unqualified. |
return node.getQualifier().accept(this); |
} |