| << §1.3.1.(e) Dynamic binding of types | ↑ Table of Contents ↑ | §1.3.1.(g) Implicitly inheriting super-types >> |
§1.3.1.(f) tsuper
Super calls along implicit inheritance use the new keyword
tsuper. While super is still available
along regular inheritance, a call tsuper.m()
selects the version of m of the corresponding role
acquired from the super-team.
See §2.4.2 for tsuper
in the context of role constructors.
tsuper can only be used to invoke a corresponding
version of the enclosing method or constructor, i.e., an expression
tsuper.m() may only occur within the method m
with both methods having the same signature
(see §2.3.2.(b) for an exception, where both methods have slightly different signatures).
| << §1.3.1.(e) Dynamic binding of types | ↑ Table of Contents ↑ | §1.3.1.(g) Implicitly inheriting super-types >> |
R1in teamToverrides the implicitly inherited methodm()fromS.tsuper.m()calls the overridden methodm()fromS.R1(line 13).