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


11.8.2 call in member variable initializer

A function call is used in the initial value of a member variable.

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

component call_in_member_definition
{
  provides ihello p;
  requires ihello r;
  behavior
  {
    bool f () {return false;}
    bool b = f ();
  }
}

This results in the following error message:

call-in-member-definition.dzn:17:14: error: call in member variable
    initializer