↑ Table of Contents ↑ | §4.8.(b) Qualified and unqualified names >> |
§4.8.(a) Precedence declaration
A precedence declaration consists of the keyword precedence
followed by
a list of names referring to callin bindings (see §4.1.(e) for named callin bindings).
precedence callinBinding1, callinBinding2;
A precedence declaration is only legal within a role or team class.
The order of elements in a precedence declaration determines their priority during dispatch,
similar to priorities based on activation of several team instances (§5.1).
This means that before
and replace
binding with highest priority trigger first,
whereas after
bindings with highest priority trigger last.
For binding precedences (as opposed to class based precedence, see §4.8.(c) below)
which refer to after
bindings, the precedence declaration must also use the after
keyword
to remind the programmer that the execution order is inverse to the textual order.
precedence after importantExecuteLast, lessImportantExecuteEarlier;
↑ Table of Contents ↑ | §4.8.(b) Qualified and unqualified names >> |