Fix type operator for interface signals (#6050) (#6049)

This commit is contained in:
Todd Strader
2025-06-06 11:29:33 -04:00
committed by GitHub
parent 9fc223d3ee
commit d49efa79df
6 changed files with 136 additions and 2 deletions
+3 -2
View File
@@ -767,6 +767,7 @@ class ParamProcessor final {
}
} else if (AstParamTypeDType* const modvarp = pinp->modPTypep()) {
AstNodeDType* rawTypep = VN_CAST(pinp->exprp(), NodeDType);
if (rawTypep) V3Width::widthParamsEdit(rawTypep);
AstNodeDType* exprp = rawTypep ? rawTypep->skipRefToNonRefp() : nullptr;
const AstNodeDType* const origp = modvarp->skipRefToNonRefp();
if (!exprp) {
@@ -945,7 +946,7 @@ class ParamProcessor final {
for (auto* stmtp = srcModpr->stmtsp(); stmtp; stmtp = stmtp->nextp()) {
if (AstParamTypeDType* dtypep = VN_CAST(stmtp, ParamTypeDType)) {
if (VN_IS(dtypep->skipRefp(), VoidDType)) {
if (VN_IS(dtypep->skipRefOrNullp(), VoidDType)) {
nodep->v3error(
"Class parameter type without default value is never given value"
<< " (IEEE 1800-2023 6.20.1): " << dtypep->prettyNameQ());
@@ -1234,7 +1235,7 @@ class ParamVisitor final : public VNVisitor {
}
void visit(AstParamTypeDType* nodep) override {
iterateChildren(nodep);
if (VN_IS(nodep->skipRefp(), VoidDType)) {
if (VN_IS(nodep->skipRefOrNullp(), VoidDType)) {
nodep->v3error("Parameter type without default value is never given value"
<< " (IEEE 1800-2023 6.20.1): " << nodep->prettyNameQ());
}