Fix sampling of hierarchical references (#7386)

This commit is contained in:
Ryszard Rozak
2026-04-08 07:09:25 -04:00
committed by GitHub
parent 141fe8bdad
commit 7dcf586807
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -709,9 +709,8 @@ class AssertVisitor final : public VNVisitor {
}
VL_DO_DANGLING(pushDeletep(nodep), nodep);
}
void visit(AstVarRef* nodep) override {
iterateChildren(nodep);
if (m_inSampled && !(nodep->varp() && nodep->varp()->noSample())) {
void visit(AstNodeVarRef* nodep) override {
if (m_inSampled && !nodep->varp()->noSample()) {
if (!nodep->access().isReadOnly()) {
nodep->v3warn(E_UNSUPPORTED,
"Unsupported: Write to variable in sampled expression");