[Next] [Previous] [Up] [Top] [Contents] [Index]

3 Static Types

3.8 Type Checking Subtyping Declarations

When the programmer declares that an object conforms to a type (via a subtypes or isa clause), the type system trusts this declaration and uses it when checking conformance and subtyping. However, it is possible that the programmer's claim is wrong, and that the object in fact does not faithfully implement the interface of the types to which it supposedly conforms. In this case, the signature implementation checking, described in section 3.6.2, is sufficient to detect and report the error, so no additional checking is required. When enumerating and checking message representatives matching a signature defined on the supertype, the object in question, if not abstract, will be enumerated, and the error will be detected because some signature will not be implemented properly for that object. If the object is abstract, no type error will be reported. This will not affect running programs since the abstract object cannot be used in a message. Also, since abstract objects are allowed to be incomplete, it is unclear whether a type error really exists.