§1.3.1.(c) Overriding and implicit inheritance

If a team contains a role class definition by the same name as a role defined in its super-team, the new role class overrides the corresponding role from the super-team and implicitly inherits all of its features. Such relation is established only by name correspondence.

A role that overrides an inherited role should be marked with an @Override annotation. A compiler should optionally flag a missing @Override annotation with a warning. Conversely, it is an error if a role is marked with an @Override annotation but does not actually override an inherited role.

It is an error to override a role class with an interface or vice versa. A final role cannot be overridden.
Unlike regular inheritance, constructors are also inherited along implicit inheritance, and can be overridden just like normal methods.

In Listing 1.3.1-1 R1 in T implicitly inherits all features of R1 in S. This is, because its enclosing team T extends the team S (line 10) and the role definition uses the same name R1 (line 11). Hence the attribute ok is available in the method m() in T.R1 (line 13). T.R1 also overrides S.R1 which is marked by the @Override annotation in line 11.