Fix calling new with arguments in same class (#3166).

This commit is contained in:
Wilson Snyder
2021-10-12 21:22:59 -04:00
parent c3bec344a4
commit b64e89f7ed
4 changed files with 17 additions and 4 deletions
+1 -1
View File
@@ -3191,7 +3191,7 @@ private:
}
virtual void visit(AstNew* nodep) override {
if (nodep->didWidthAndSet()) return;
if (nodep->didWidth()) return;
AstClassRefDType* refp
= m_vup ? VN_CAST(m_vup->dtypeNullSkipRefp(), ClassRefDType) : nullptr;
if (!refp) { // e.g. int a = new;