Fix $monitor with dotted references (#5794).

This commit is contained in:
Wilson Snyder
2025-02-21 17:18:49 -05:00
parent f7ccc013e7
commit 1857f6399c
5 changed files with 117 additions and 3 deletions
+3 -2
View File
@@ -534,8 +534,9 @@ class AssertVisitor final : public VNVisitor {
while (monExprsp) {
if (AstNodeVarRef* varrefp = VN_CAST(monExprsp, NodeVarRef)) {
AstSenItem* const senItemp
= new AstSenItem(fl, VEdgeType::ET_CHANGED,
new AstVarRef{fl, varrefp->varp(), VAccess::READ});
= new AstSenItem{fl, VEdgeType::ET_CHANGED,
// Clone so get VarRef or VarXRef as needed
varrefp->cloneTree(false)};
if (!monSenItemsp) {
monSenItemsp = senItemp;
} else {