V0.8: complain about a negative repeat value.
This patch mirrors what was done in development to complain about a negative repeat value.
This commit is contained in:
parent
c8bffe728a
commit
abc2aa17d2
|
|
@ -433,6 +433,15 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope, bool) const
|
|||
<< "may not be undefined (" << rep->value()
|
||||
<< ")." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (rep->value().is_negative()) {
|
||||
cerr << get_line() << ": error: Concatenation repeat "
|
||||
<< "may not be negative (" << rep->value().as_long()
|
||||
<< ")." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
repeat = rep;
|
||||
|
|
|
|||
|
|
@ -1349,6 +1349,14 @@ NetNet* PEConcat::elaborate_net(Design*des, NetScope*scope,
|
|||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (erep->value().is_negative()) {
|
||||
cerr << get_line() << ": error: Concatenation repeat "
|
||||
<< "may not be negative (" << erep->value().as_long()
|
||||
<< ")." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* The operands of the concatenation must contain all
|
||||
|
|
|
|||
Loading…
Reference in New Issue