From 549c546dd0baa70e28f406461f6f49b78372fc55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BE=AA?= Date: Fri, 27 Dec 2024 17:45:15 +0800 Subject: [PATCH] resolve: update references collection cycle detect logic --- .../org/aya/resolve/visitor/VariableDependencyCollector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }