Sub/super type question



If a concept type is a subtype of itself, why is it not true with supertype as I noticed it is possible for it to return null (i.e. Type::superType() can return null while Type::subTypes() returns at least the type itself)?



Hi Stefan,

subTypes() returns both direct and inferred sub-types, while superType() returns only the direct super-type. If there is no direct super-type, then it will return null. A type is inferred to be a sub-type of itself, so always appears in the results of subTypes().


Yes, that’s the behaviour that I have observed however is there any justification for this apparent asymmetricity of the sub/super type relation?