The documentation on Composite Types says that inheritance is not supported. But I read earlier that
AnyStruct is the top type of all non-resource types, i.e., all non-resource types are a subtype of it.
AnyResource is the top type of all resource types.
Would not a “top type” indicate that inheritance was at play? How else does one have an array of AnyStruct objects (structs, rather) unless there was some form of inheritance and super typing?
User-defined inheritance isn’t supported, but these are examples of a built-in type hierarchy, which is similar, but not the same as custom inheritance
Subtyping and inheritance are two separate concepts: Subtyping defines a hierarchy of types, and inheritance allows the reuse of code / implementations.
In some languages these two concepts are used at the same time, for example in class-based object oriented languages, defining a subclass both inherits from the superclass, and also declares a subtyping relation.