Improve error message about signal type conflict.
When the parser detects a signal type conflict, print a more useful error message. In the process, be more careful with what line number is actually attributed to the declaration.
This commit is contained in:
parent
3190066013
commit
35e0a98732
10
pform.cc
10
pform.cc
|
|
@ -1447,11 +1447,11 @@ void pform_makewire(const vlltype&li, perm_string name,
|
|||
bool rc = cur->set_wire_type(type);
|
||||
if (rc == false) {
|
||||
ostringstream msg;
|
||||
msg << name << " definition conflicts with "
|
||||
<< "definition at " << cur->get_fileline()
|
||||
msg << name << " " << type
|
||||
<< " definition conflicts with " << cur->get_wire_type()
|
||||
<< " definition at " << cur->get_fileline()
|
||||
<< ".";
|
||||
VLerror(msg.str().c_str());
|
||||
cerr << "XXXX type=" << type <<", curtype=" << cur->get_wire_type() << endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1460,9 +1460,11 @@ void pform_makewire(const vlltype&li, perm_string name,
|
|||
if (! cur) {
|
||||
new_wire_flag = true;
|
||||
cur = new PWire(name, type, pt, dt);
|
||||
FILE_NAME(cur, li.text, li.first_line);
|
||||
}
|
||||
|
||||
FILE_NAME(cur, li.text, li.first_line);
|
||||
if (type != NetNet::IMPLICIT)
|
||||
FILE_NAME(cur, li.text, li.first_line);
|
||||
|
||||
bool flag;
|
||||
switch (dt) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue