Previous: Must specify provides-port with reply on out-trigger, Up: Well-formedness – Reply [Contents][Index]
provides-port with replyWhen a reply is used in the body of a function, and the component
has multiple provides ports, the reply must specify which port it
belongs to:
interface ihello
{
in bool hello ();
behavior
{
on hello: reply (true);
on hello: reply (false);
}
}
component function_reply_needs_provides_port
{
provides ihello left;
provides ihello right;
behavior
{
void f (bool b)
{
left.reply (b);
}
void g (bool b)
{
reply (b);
}
on left.hello (): f (true);
on right.hello (): g (false);
}
}
This results in the following error message:
function-reply-needs-provides-port.dzn:23:7: error: must specify a
provides-port with reply