Improve error message when variable used as data type (#7318)
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
This commit is contained in:
parent
3b328d2bb6
commit
9a01a4054a
|
|
@ -5900,7 +5900,9 @@ class LinkDotResolveVisitor final : public VNVisitor {
|
|||
} else {
|
||||
if (foundp) {
|
||||
UINFO(1, "Found sym node: " << foundp->nodep());
|
||||
nodep->v3error("Expecting a data type: " << nodep->prettyNameQ());
|
||||
nodep->v3error("Expecting a data type: "
|
||||
<< nodep->prettyNameQ()
|
||||
<< ", found: " << foundp->nodep()->prettyTypeName());
|
||||
} else {
|
||||
nodep->v3error("Can't find typedef/interface: " << nodep->prettyNameQ());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%Error: t/t_lparam_assign_iface_typedef_bad.v:28:3: Expecting a data type: 'p0_rq_t'
|
||||
%Error: t/t_lparam_assign_iface_typedef_bad.v:28:3: Expecting a data type: 'p0_rq_t', found: VAR 'p0_rq_t'
|
||||
28 | p0_rq_t rq;
|
||||
| ^~~~~~~
|
||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%Error: t/t_struct_type_bad.v:13:5: Expecting a data type: 'i'
|
||||
%Error: t/t_struct_type_bad.v:13:5: Expecting a data type: 'i', found: VAR 'i'
|
||||
13 | i badi;
|
||||
| ^
|
||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||
|
|
|
|||
Loading…
Reference in New Issue