mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 08:24:31 +02:00
Fix internal error when handling typedefs containing parameterized class type members (#7635) (#7661)
Fixes #7635.
This commit is contained in:
@@ -1300,6 +1300,14 @@ class ParamProcessor final {
|
||||
// Resolve an unresolved RefDType whose classOrPackageOp targets a parameterized
|
||||
// class or a typedef alias of one. Specializes the class and links the typedef.
|
||||
void resolveParamClassRefDType(AstNodeDType* dtypep) {
|
||||
// Recurse into struct/union members for buried RefDTypes
|
||||
if (AstNodeUOrStructDType* const sup = VN_CAST(dtypep, NodeUOrStructDType)) {
|
||||
for (AstMemberDType* memp = sup->membersp(); memp;
|
||||
memp = VN_AS(memp->nextp(), MemberDType)) {
|
||||
resolveParamClassRefDType(memp->subDTypep());
|
||||
}
|
||||
return;
|
||||
}
|
||||
AstRefDType* const refp = dtypep ? VN_CAST(dtypep, RefDType) : nullptr;
|
||||
if (!refp) return;
|
||||
if (refp->typedefp() || refp->refDTypep()) return;
|
||||
|
||||
Reference in New Issue
Block a user