§1.5.(f) Qualified tsuper

A role in a nested team may qualify the keyword tsuper (see §1.3.1.(f) above) by a type name in order to select among different method version inherited from different implicit super classes. A term OuterTeam.tsuper evaluates to the super-class, say SuperOuter, of an enclosing team "OuterTeam". A method call OuterTeam.tsuper.m() evaluates to the method version within SuperOuter that best corresponds to the current method containing the tsuper-call.

  • In the above example (Listing 1.5) line 28 is identical to an unqualified tsuper-call
  • Line 29 selects a corresponding method from the context of SuperOuter resolving to SuperOuter.RoleAndTeamSub.InnerRole.foo()