From b0cb43b2f221d03716fb4b279ad5fcbcc4a2af3f Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 24 Nov 2020 21:41:32 -0500 Subject: [PATCH] Fix not iterating some extended classes depending on declaration order. --- src/V3Width.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/V3Width.cpp b/src/V3Width.cpp index a79bb2834..ae0c2731f 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -2203,6 +2203,9 @@ private: } virtual void visit(AstClass* nodep) override { if (nodep->didWidthAndSet()) return; + // Must do extends first, as we may in functions under this class + // start following a tree of extends that takes us to other classes + userIterateAndNext(nodep->extendsp(), nullptr); userIterateChildren(nodep, nullptr); // First size all members nodep->repairCache(); }