diff --git a/base/src/main/java/org/aya/resolve/visitor/VariableDependencyCollector.java b/base/src/main/java/org/aya/resolve/visitor/VariableDependencyCollector.java index d9f22d0af..6612372ba 100644 --- a/base/src/main/java/org/aya/resolve/visitor/VariableDependencyCollector.java +++ b/base/src/main/java/org/aya/resolve/visitor/VariableDependencyCollector.java @@ -54,13 +54,13 @@ public void registerVariable(GeneralizedVar var) { var deps = collectReferences(var); dependencies.put(var, deps); - visiting.remove(var); // Recursively register dependencies for (var dep : deps) { registerVariable(dep); } + visiting.remove(var); visited.add(var); }