Tests: Add t_param_type_bad3

This commit is contained in:
Wilson Snyder
2025-05-06 21:11:34 -04:00
parent b099d6fe63
commit bc3bf6ab5e
5 changed files with 39 additions and 4 deletions
+2 -2
View File
@@ -928,7 +928,7 @@ class ParamProcessor final {
for (auto* stmtp = srcModpr->stmtsp(); stmtp; stmtp = stmtp->nextp()) {
if (AstParamTypeDType* dtypep = VN_CAST(stmtp, ParamTypeDType)) {
if (VN_IS(dtypep->subDTypep(), VoidDType)) {
if (VN_IS(dtypep->skipRefp(), VoidDType)) {
nodep->v3error(
"Class parameter type without default value is never given value"
<< " (IEEE 1800-2023 6.20.1): " << dtypep->prettyNameQ());
@@ -1217,7 +1217,7 @@ class ParamVisitor final : public VNVisitor {
}
void visit(AstParamTypeDType* nodep) override {
iterateChildren(nodep);
if (VN_IS(nodep->subDTypep(), VoidDType)) {
if (VN_IS(nodep->skipRefp(), VoidDType)) {
nodep->v3error("Parameter type without default value is never given value"
<< " (IEEE 1800-2023 6.20.1): " << nodep->prettyNameQ());
}