Feature request: also support function to return with action used in a return expression to omit temporary variables
To further make the 'omit explicit temporary variables' feature complete, please allow support for returning an action output as return expression.
Two preferred flavours:
Result MyFunc()
{
return rp.DoSomething(); // return the valued reply of a call on a required port
}
Result Calc()
{
return MyFunc(); // return the return value of an other function
}
At this moment, when trying to write it this way, you'll get the following response on dzn verify:
error: action used in a return expression
As a consequence the developer has to write it still with temporary variables, which is not nice-ish:
Result MyFunc()
{
Result temp = rp.DoSomething(); // temporarily store the valued reply of a call on a required port
return temp;
}
Result Calc()
{
Result temp = MyFunc(); // temporarily store the valued reply of an other function
return temp;
}