From 223bf64bde41263b9bd519a4001296588868068e Mon Sep 17 00:00:00 2001 From: Pawel Kojma Date: Thu, 12 Feb 2026 16:47:34 +0100 Subject: [PATCH] Do not check base class Signed-off-by: Pawel Kojma --- src/V3AstNodeOther.h | 2 +- src/V3LinkResolve.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/V3AstNodeOther.h b/src/V3AstNodeOther.h index 5d9fd5fac..ba053c2f9 100644 --- a/src/V3AstNodeOther.h +++ b/src/V3AstNodeOther.h @@ -2609,7 +2609,7 @@ public: "T_Callable 'f' must have a signature compatible with 'void(AstClass*, T_Node*)', " "with 'T_Node' being a subtype of 'AstNode'"); if (const AstClassExtends* const cextendsp = this->extendsp()) { - if (cextendsp->classOrNullp()) cextendsp->classp()->foreachMember(f); + cextendsp->classp()->foreachMember(f); } for (AstNode* stmtp = stmtsp(); stmtp; stmtp = stmtp->nextp()) { if (AstNode::privateTypeTest(stmtp)) f(this, static_cast(stmtp)); diff --git a/src/V3LinkResolve.cpp b/src/V3LinkResolve.cpp index 8dc362635..766097c5e 100644 --- a/src/V3LinkResolve.cpp +++ b/src/V3LinkResolve.cpp @@ -72,9 +72,11 @@ class LinkResolveVisitor final : public VNVisitor { void visit(AstClass* nodep) override { VL_RESTORER(m_classp); m_classp = nodep; - nodep->foreachMember([&](AstClass* const, AstVar* const varp) { - if (!varp->isParam()) varp->varType(VVarType::MEMBER); - }); + for (AstNode* stmtp = nodep->stmtsp(); stmtp; stmtp = stmtp->nextp()) { + if (AstVar* const varp = VN_CAST(stmtp, Var)) { + if (!varp->isParam()) varp->varType(VVarType::MEMBER); + } + } iterateChildren(nodep); } void visit(AstConstraint* nodep) override {