<< §1.2.2.(h) Externalized creation | ↑ Table of Contents ↑ |
§1.2.2.(i) No import
It is neither useful nor legal to import a role type.
Rationale:
Importing a type allows to use the unqualified name in situations that would otherwise require to use the fully qualified name, i.e., the type prefixed with its containing package and enclosing class. Roles, however are contained in a team instance. Outside their team, role types can only be accessed using an anchored type which uses a team instance to qualify the role type. Relative to this team anchor, roles are always denoted using their simple name, which makes importing roles useless.A static import for a constant declared in a role is, however, legal.
<< §1.2.2.(h) Externalized creation | ↑ Table of Contents ↑ |