Fix param-dependent class typedef linking (#6171)

This commit is contained in:
Igor Zaworski
2025-07-10 21:11:09 -04:00
committed by GitHub
parent 4dc6a31276
commit 4e8a8a0398
3 changed files with 47 additions and 0 deletions
+6
View File
@@ -4471,6 +4471,12 @@ class LinkDotResolveVisitor final : public VNVisitor {
nodep->classOrPackagep(cpackagerefp->classOrPackageSkipp());
if (!VN_IS(nodep->classOrPackagep(), Class)
&& !VN_IS(nodep->classOrPackagep(), Package)) {
if (m_statep->forPrimary()) {
// It may be a type that comes from parameter class that is not
// instantioned yet
iterate(cpackagep);
return;
}
// Likely impossible, as error thrown earlier
cpackagerefp->v3error( // LCOV_EXCL_LINE
"'::' expected to reference a class/package but referenced '"