Common use of Exp Clause in Contracts

Exp. Exact types also restrict the subtyping relationships of nested types. For example, ASTDisplay!.▇▇▇▇▇▇ is not a subtype of AST!.Binary, even though ASTDisplay.Binary is a subtype of AST.Binary. Therefore exact types can mark the boundary of a family: classes nested in ASTDisplay! form one family and those nested in AST! form another. Non-dependent exact types provide a locally closed world: at compile time, one can enumerate all classes that are subtypes of A!.C, without inspecting subclasses of A. Exact types are important for the modularity of J&s (Section 2.5).

Appears in 2 contracts

Sources: Class Sharing Mechanism, Class Sharing Mechanism