Fix lost $stop on implied assertion $error failures.

This commit is contained in:
Wilson Snyder
2026-03-28 10:57:59 -04:00
parent 31757df229
commit e0b4d5ad44
5 changed files with 58 additions and 3 deletions
+2 -3
View File
@@ -737,9 +737,8 @@ class AssertVisitor final : public VNVisitor {
// Cover adds COVERINC by AstNode::addNext, thus need to clone next too.
nodep->replaceWith(m_passsp->cloneTree(true));
} else if (!nodep->pass() && m_failsp) {
// Asserts with multiple statements are wrapped in implicit begin/end blocks so no
// need to clone next.
nodep->replaceWith(m_failsp->cloneTree(false));
// Stop may be added, thus need to clone next too.
nodep->replaceWith(m_failsp->cloneTree(true));
} else {
nodep->unlinkFrBack();
}