<< §3.2 Callout parameter mapping | ↑ Table of Contents ↑ | §3.4 Overriding access restrictions >> |
§3.3 Lifting and lowering
(For basic definitions see §2.2 and §2.3)
(a) Call target translation
Invoking a base method due to a callout binding first lowers the role object in order to obtain the effective call target.
(b) Parameter translation
Passing a role object as parameter to a callout method implicitly lowers
this parameter, if the base method declares a corresponding base type parameter.
Lifting of callout parameters is not possible.
(c) Result translation
When returning a base object from a callout method where the role
method declares the result to be of a role class,
this object is implicitly lifted to the appropriate role.
Lowering the result of a callout binding is not possible.
(d) Typing rules
A parameter mapping (implicit by parameter position or explicit
by a with
clause) is well typed if
the left hand side conforms to the right hand side, either by
- type equality
- implicit primitive type conversion
- subtype polymorphism
- translation polymorphism, here: lowering,
- 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 right hand side conforms to the
left hand side according to the rules given above, except that
translation polymorphism here applies lifting instead of
lowering.
<< §3.2 Callout parameter mapping | ↑ Table of Contents ↑ | §3.4 Overriding access restrictions >> |