Handle system functions that return enumerations.

There are a few internal system functions that return enumeration
values, and the type checker needs to properly account for that.
This commit is contained in:
Stephen Williams
2010-11-07 15:02:42 -08:00
parent cc304ef0db
commit e1344745f8
5 changed files with 44 additions and 27 deletions
+3 -3
View File
@@ -1359,12 +1359,12 @@ NetNet* NetESFunc::synthesize(Design*des, NetScope*scope, NetExpr*root)
}
NetEvWait*trigger = 0;
if (nparms_ == 0) {
if (parms_.size() == 0) {
trigger = make_func_trigger(des, scope, root);
}
NetSysFunc*net = new NetSysFunc(scope, scope->local_symbol(),
def, 1+nparms_, trigger);
def, 1+parms_.size(), trigger);
net->set_line(*this);
des->add_node(net);
@@ -1378,7 +1378,7 @@ NetNet* NetESFunc::synthesize(Design*des, NetScope*scope, NetExpr*root)
connect(net->pin(0), osig->pin(0));
unsigned errors = 0;
for (unsigned idx = 0 ; idx < nparms_ ; idx += 1) {
for (unsigned idx = 0 ; idx < parms_.size() ; idx += 1) {
NetNet*tmp = parms_[idx]->synthesize(des, scope, root);
if (tmp == 0) {
cerr << get_fileline() << ": error: Unable to elaborate "