<< §4.8.(c) Class based precedence | ↑ Table of Contents ↑ | §4.8.(e) Binding overriding >> |
§4.8.(d) Multiple precedence statements
All precedence statements are collected at the outer-most team. At that level all precedence declarations involving the same base method are merged using the C3 algorithm [3]. When merging precendence declarations more deeply nested declarations have higher priority than outer declarations. For several declarations at the same nesting level the lexical ordering determines the priority.
At any point the C3 algorithm will ensure that the resulting order after merging is consistent with each individual precedence declaration. It is an error to declare incompatible precedence lists that cannot be merged by the C3 algorithm.
<< §4.8.(c) Class based precedence | ↑ Table of Contents ↑ | §4.8.(e) Binding overriding >> |