Fix internal error on an enum literal inside a with lambda body (#8190) (#8193)

This commit is contained in:
Aditya Shevade
2026-08-23 07:47:43 -04:00
committed by GitHub
parent 459711ba71
commit d5f7878eb4
4 changed files with 98 additions and 0 deletions
+4
View File
@@ -36,6 +36,7 @@
#include "V3Randomize.h"
#include "V3Ast.h"
#include "V3Const.h"
#include "V3Error.h"
#include "V3FileLine.h"
#include "V3Global.h"
@@ -2852,6 +2853,9 @@ class ConstraintExprVisitor final : public VNVisitor {
}
VL_DO_DANGLING(elemSelp->deleteTree(), elemSelp);
// enum-literal folding pass already ran -- re-fold the literals.
perElemExprp = V3Const::constifyEdit(perElemExprp);
perElemExprp->foreach([&](AstNode* nodep) {
// Don't mark loop variable references as randomizable
if (!VN_IS(nodep, Const)) {