mirror of
https://github.com/verilator/verilator.git
synced 2026-09-01 10:27:04 +02:00
Support pure constraint.
This commit is contained in:
@@ -162,6 +162,18 @@ private:
|
||||
nodep->replaceWith(nodep->lhsp()->unlinkFrBack());
|
||||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
}
|
||||
void visit(AstConstraint* nodep) override {
|
||||
iterateChildren(nodep);
|
||||
editDType(nodep);
|
||||
{
|
||||
const AstClass* const classp = VN_CAST(m_modp, Class);
|
||||
if (nodep->isKwdPure()
|
||||
&& (!classp || (!classp->isInterfaceClass() && !classp->isVirtual()))) {
|
||||
nodep->v3error("Illegal to have 'pure constraint' in non-abstract class"
|
||||
" (IEEE 1800-2023 18.5.2)");
|
||||
}
|
||||
}
|
||||
}
|
||||
void visit(AstNodeDType* nodep) override {
|
||||
// Note some specific dtypes have unique visitors
|
||||
visitIterateNodeDType(nodep);
|
||||
|
||||
Reference in New Issue
Block a user