Fix recursive constant function in $unit scope (#7174) (#7178)

This commit is contained in:
jalcim
2026-03-02 15:15:34 -05:00
committed by Wilson Snyder
parent 251d1835cf
commit d406efdcf9
4 changed files with 58 additions and 0 deletions
+1
View File
@@ -259,6 +259,7 @@ class ScopeVisitor final : public VNVisitor {
clonep = nodep->cloneTree(false);
}
nodep->user2p(clonep);
clonep->user2p(clonep); // For recursive self-references after cloneTree
m_scopep->addBlocksp(clonep);
// We iterate under the *clone*
iterateChildren(clonep);