Previous: , Up: Well-formedness – Mixing   [Contents][Index]


11.6.7 Cannot use illegal in function

In an interface, a trigger can only be declared illegal in a direct way. This is due to the declarative character of interfaces. To be more specific, it must not occur in a function body. An example:

interface interface_function_illegal
{
  in void hello ();
  behavior
  {
    void f ()
    {
      illegal;
    }
    on hello: f ();
  }
}

This results in the following error message:

interface-function-illegal.dzn:8:7: error: cannot use illegal in
    function