Next: Call in member variable initializer, Previous: Action in member variable initializer, Up: Well-formedness -- Valued Actions and Calls [Contents][Index]
action
used in a complex expressionAn action
is used in a complex expression.
interface ihello { in bool hello (); in bool cruel (); behavior { on hello: reply (true); on cruel: reply (true); } } component action_in_complex_expression { provides ihello p; requires ihello r; behavior { bool b = true; void f (bool b) { reply (b); } on p.hello (): if (r.hello () && r.cruel ()) // not allowed reply (false || r.cruel ()); // not allowed else if (r.hello () || true) reply (r.hello () == true); else reply (!r.hello ()); on p.cruel (): f (r.hello ()); // not allowed } }
This results in the following error messages:
action-in-complex-expression.dzn:24:25: error: action used in a complex expression action-in-complex-expression.dzn:25:25: error: action used in a complex expression action-in-complex-expression.dzn:30:23: error: action used in a complex expression