From f9f70383fa2c00742565ee4f4e9aaab7c6640a8a Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 24 Jun 2025 17:29:44 -0400 Subject: [PATCH] Fix instability in non-data type internal error --- src/V3LinkDot.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index 92d9154b9..e93f321e0 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -2611,8 +2611,10 @@ class LinkDotResolveVisitor final : public VNVisitor { if (oldp->wouldBreak(newp)) { newp->v3error( "Data type used where a non-data type is expected: " << newp->prettyNameQ()); + oldp->replaceWith(new AstConst{newp->fileline(), AstConst::BitFalse{}}); + } else { + oldp->replaceWith(newp); } - oldp->replaceWith(newp); } // Marks the current module to be revisited after the initial AST iteration