mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Fix handling of ref types in initial values of type parameters (#4304)
This commit is contained in:
@@ -1077,6 +1077,7 @@ public:
|
||||
AstRefDType(FileLine* fl, FlagTypeOfExpr, AstNode* typeofp)
|
||||
: ASTGEN_SUPER_RefDType(fl) {
|
||||
this->typeofp(typeofp);
|
||||
if (AstNodeDType* const dtp = VN_CAST(typeofp, NodeDType)) refDTypep(dtp);
|
||||
}
|
||||
ASTGEN_MEMBERS_AstRefDType;
|
||||
// METHODS
|
||||
|
||||
+1
-1
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user