<< §3.2.(d) Visible names | ↑ Table of Contents ↑ |
§3.2.(e) Implicit parameter mappings
If parameter mappings should be omitted the following conditions must hold:
- each method parameter of the role method must conform to the corresponding parameter of the base method, and
- the result type of the base method must conform to the result type of the role method.
Here conformance includes translation polymorphism (cf. §3.3.(d)).
Parameter correspondence without parameter mapping is determined by declaration order not by names.
Two adjustments can, however, be performed implicitly:
- If the role method has more parameters than the base method, unused trailing parameters may be silently ignored.
- If the role method returns
void
, any result from the base method may be silently ignored.
<< §3.2.(d) Visible names | ↑ Table of Contents ↑ |