mirror of
https://github.com/verilator/verilator.git
synced 2025-05-01 13:06:56 +00:00
Internals: Assert on misexpected 'new'.
This commit is contained in:
parent
60a1d25a96
commit
1a92a44c7d
@ -3091,7 +3091,8 @@ private:
|
||||
|
||||
virtual void visit(AstNew* nodep) override {
|
||||
if (nodep->didWidthAndSet()) return;
|
||||
AstClassRefDType* refp = VN_CAST(m_vup->dtypeNullSkipRefp(), ClassRefDType);
|
||||
AstClassRefDType* refp
|
||||
= m_vup ? VN_CAST(m_vup->dtypeNullSkipRefp(), ClassRefDType) : nullptr;
|
||||
if (!refp) { // e.g. int a = new;
|
||||
nodep->v3error("new() not expected in this context");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user