Fix overlapping case item expressions (#6825) (#6886)

This commit is contained in:
Luca Colagrande
2026-01-06 15:07:25 -05:00
committed by GitHub
parent 45349990a1
commit 112e1e3752
5 changed files with 97 additions and 14 deletions
+7 -3
View File
@@ -244,9 +244,13 @@ class CaseVisitor final : public VNVisitor {
caseItemMap[icondp] = itemp;
foundHit = true;
} else if (!overlappedCondp) {
firstOverlap = i;
overlappedCondp = m_valueItem[i];
m_caseNoOverlapsAllCovered = false;
// Overlapping case item expressions in the
// same case item are legal
if (caseItemMap[m_valueItem[i]] != itemp) {
firstOverlap = i;
overlappedCondp = m_valueItem[i];
m_caseNoOverlapsAllCovered = false;
}
}
}
}