mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Add error on missing forward declarations (#6207).
This commit is contained in:
+1
-13
@@ -782,19 +782,7 @@ class ParamProcessor final {
|
||||
// Constify may have caused pinp->exprp to change
|
||||
rawTypep = VN_AS(pinp->exprp(), NodeDType);
|
||||
exprp = rawTypep->skipRefToNonRefp();
|
||||
bool ok = true;
|
||||
switch (modvarp->fwdType()) {
|
||||
case VFwdType::NONE: ok = true; break;
|
||||
case VFwdType::ENUM: ok = VN_IS(exprp, EnumDType); break;
|
||||
case VFwdType::STRUCT: ok = VN_IS(exprp, StructDType); break;
|
||||
case VFwdType::UNION: ok = VN_IS(exprp, UnionDType); break;
|
||||
case VFwdType::CLASS: ok = VN_IS(exprp, ClassRefDType); break;
|
||||
case VFwdType::INTERFACE_CLASS: // TODO: Over permissive for now:
|
||||
ok = VN_IS(exprp, ClassRefDType);
|
||||
break;
|
||||
default: modvarp->v3fatalSrc("Bad case");
|
||||
}
|
||||
if (!ok) {
|
||||
if (!modvarp->fwdType().isNodeCompatible(exprp)) {
|
||||
pinp->v3error("Parameter type expression type "
|
||||
<< exprp->prettyDTypeNameQ()
|
||||
<< " violates parameter's forwarding type '"
|
||||
|
||||
Reference in New Issue
Block a user