Handle default argument values for class function method calls
For class function method calls currently only as many arguments as have been supplied are elaborated. Any trailing arguments that might have default values are skipped. This will trigger an assertion later on in the vvp code generator backend. Fix this by making sure that all arguments of the function are evaluated. Note that this already works correctly for class task method calls. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
3b711ed785
commit
46951c778e
|
|
@ -3185,13 +3185,13 @@ NetExpr* PECallFunction::elaborate_expr_method_(Design*des, NetScope*scope,
|
|||
NetNet*res = method->find_signal(method->basename());
|
||||
ivl_assert(*this, res);
|
||||
|
||||
vector<NetExpr*>parms;
|
||||
vector<NetExpr*> parms(def->port_count());
|
||||
ivl_assert(*this, def->port_count() >= 1);
|
||||
|
||||
NetESignal*ethis = new NetESignal(net);
|
||||
ethis->set_line(*this);
|
||||
parms.push_back(ethis);
|
||||
parms[0] = ethis;
|
||||
|
||||
parms.resize(1 + parms_.size());
|
||||
elaborate_arguments_(des, scope, def, false, parms, 1);
|
||||
|
||||
NetESignal*eres = new NetESignal(res);
|
||||
|
|
|
|||
Loading…
Reference in New Issue