mirror of
https://github.com/verilator/verilator.git
synced 2026-10-02 16:13:34 +02:00
Improve error message when variable used as data type (#7318)
Signed-off-by: Ryszard Rozak <[email protected]>
This commit is contained in:
+3
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user