Closed anatoliykmetyuk closed 9 years ago
A formal parameter with "?" is an output parameter. A second "??" there means that the actual parameter may be an output parameter, but it may also have a constraint, or it may be forcing. E.g. in
setStr("")
you give it a value; now when body of setStr
succeeds (as after the "New value" printing), then the values of the actual paramter ("Hello World!") is matched against the one of the formal parameter ("").
These do not match, hence the success is not propagated upwards through the call.
Effectively we have then deadlock which is what you observed.
So the issue is closed. A bit harder issue is how we should write down tests for these particularities with all these parameters. FTTB when we don't have a good way of writing such tests we can leave it like it is now.
This code's
firstScript
:outputs:
The sequence of
firstScript
doesn't continue after thesetStr(x)
call. If called with?x
, everything works fine. Normally,x
should also work fine, since it is converted to anActualOutputParameter
by a DSL conversion method.