<< §4.5.(c) Result translation | ↑ Table of Contents ↑ | §4.5.(e) Role arrays >> |
§4.5.(d) Typing rules
A parameter mapping (implicit by parameter position or explicit
by a with
clause) is well typed if
the right hand side conforms to the left hand side, either by
- type equality
- implicit primitive type conversion
- subtype polymorphism
- translation polymorphism, here: lifting;
however, withinreplace
bindings step 1 of the smart lifting algorithm (§2.3.3.(a)) is not applicable - or by a combination of the above.
A result mapping (implicit or explicit by a with
clause)
is well typed, if the value at the left hand conforms to the
right hand side according to the rules given above, except that
translation polymorphism here applies lowering instead of
lifting.
These rules define translation polymorphism as introduced in §2.3.
Additionally, in a replace
callin binding compatibility of parameters and return
types must hold in both directions.
Thus, from the above list of conversions a replace binding cannot apply subtype polymorphism
nor primitive type conversion.
If more flexibility is desired, type parameters can be used as defined in §4.10.
<< §4.5.(c) Result translation | ↑ Table of Contents ↑ | §4.5.(e) Role arrays >> |