[#80101] Getting param dependent type linking error fix

Signed-off-by: Igor Zaworski <izaworski@internships.antmicro.com>
This commit is contained in:
Igor Zaworski 2025-07-09 12:31:52 +02:00
parent abd509ce53
commit 3aa7d7dfbc
2 changed files with 5 additions and 4 deletions

View File

@ -3552,9 +3552,6 @@ class LinkDotResolveVisitor final : public VNVisitor {
UINFO(9, indent() << m_ds.ascii());
VL_RESTORER(m_usedPins);
m_usedPins.clear();
UASSERT_OBJ(m_statep->forPrimary() || VN_IS(nodep->classOrPackageNodep(), ParamTypeDType)
|| nodep->classOrPackageSkipp(),
nodep, "ClassRef has unlinked class");
UASSERT_OBJ(m_statep->forPrimary() || !nodep->paramsp(), nodep,
"class reference parameter not removed by V3Param");
{
@ -3565,6 +3562,10 @@ class LinkDotResolveVisitor final : public VNVisitor {
m_statep->resolveClassOrPackage(m_ds.m_dotSymp, nodep, m_ds.m_dotPos != DP_PACKAGE,
false, ":: reference");
}
UASSERT_OBJ(m_statep->forPrimary()
|| VN_IS(nodep->classOrPackageNodep(), ParamTypeDType)
|| nodep->classOrPackageSkipp(),
nodep, "ClassRef has unlinked class");
// ClassRef's have pins, so track
if (nodep->classOrPackageSkipp()) {

View File

@ -1116,7 +1116,7 @@ class ParamVisitor final : public VNVisitor {
} else {
cellp->v3fatalSrc("Expected module parameterization");
}
UASSERT_OBJ(srcModp, cellp, "Unlinked class ref");
if (!srcModp) continue;
// Update path
string someInstanceName = modp->someInstanceName();