vhdlpp: Stop compilation on invalid attributes.
This commit is contained in:
parent
02ee3874e7
commit
d352d8ead3
|
|
@ -105,9 +105,10 @@ bool ExpAttribute::evaluate(ScopeBase*scope, int64_t&val) const
|
||||||
|
|
||||||
const VTypeArray*arr = dynamic_cast<const VTypeArray*>(base_type);
|
const VTypeArray*arr = dynamic_cast<const VTypeArray*>(base_type);
|
||||||
if (arr == 0) {
|
if (arr == 0) {
|
||||||
cerr << get_fileline() << ": error: "
|
cerr << endl << get_fileline() << ": error: "
|
||||||
<< "Cannot apply the 'length attribute to non-array objects"
|
<< "Cannot apply the 'length attribute to non-array objects"
|
||||||
<< endl;
|
<< endl;
|
||||||
|
ivl_assert(*this, false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -145,9 +146,10 @@ bool ExpAttribute::evaluate(Entity*ent, ScopeBase*scope, int64_t&val) const
|
||||||
|
|
||||||
const VTypeArray*arr = dynamic_cast<const VTypeArray*>(base_type);
|
const VTypeArray*arr = dynamic_cast<const VTypeArray*>(base_type);
|
||||||
if (arr == 0) {
|
if (arr == 0) {
|
||||||
cerr << get_fileline() << ": error: "
|
cerr << endl << get_fileline() << ": error: "
|
||||||
<< "Cannot apply the '" << name_
|
<< "Cannot apply the '" << name_
|
||||||
<< " attribute to non-array objects" << endl;
|
<< " attribute to non-array objects" << endl;
|
||||||
|
ivl_assert(*this, false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue