Fix handling of ref types in initial values of type parameters (#4304)

This commit is contained in:
Ryszard Rozak
2023-06-20 14:10:07 -04:00
committed by GitHub
parent 63b2dbb827
commit 9ee5fd0585
3 changed files with 27 additions and 1 deletions
+1 -1
View File
@@ -709,7 +709,7 @@ class ParamProcessor final : public VNDeleter {
}
} else if (AstParamTypeDType* const modvarp = pinp->modPTypep()) {
AstNodeDType* const exprp = VN_CAST(pinp->exprp(), NodeDType);
const AstNodeDType* const origp = modvarp->subDTypep();
const AstNodeDType* const origp = modvarp->skipRefToEnump();
if (!exprp) {
pinp->v3error("Parameter type pin value isn't a type: Param "
<< pinp->prettyNameQ() << " of " << nodep->prettyNameQ());