Next: , Up: Well-formedness – Valued Actions and Calls   [Contents][Index]


11.8.1 action in member variable initializer

An action is used in the initial value of a member variable.

interface ihello
{
  in bool hello ();
  behavior
  {
    on hello: reply (true);
  }
}

component action_in_member_definition
{
  provides ihello p;
  requires ihello r;
  behavior
  {
    bool b = r.hello ();
  }
}

This results in the following error message:

action-in-member-definition.dzn:16:14: error: action in member variable
    initializer