Subtype polymorphism (source code)

= Subtype polymorphism

Subtype polymorphism lets a value implementing a more specific type be used through a common supertype <object interface>. Calls to overridable <instance methods> can select implementations by <dynamic dispatch>. <Behavioral subtyping> additionally requires the concrete implementation to honor the common contract, including <preconditions>, <postconditions> and state invariants; structural access to <object method> names alone does not establish that guarantee.