3.5.1 Between Class/Interface

When defining unification behavior between classes, it is important to remember that unification is directional: we can assign a more specialized class to a generic class, but the reverse is not valid.

The following assignments are allowed:

  • Child class to parent class.
  • Class to implementing interface.
  • Interface to base interface.

These rules are transitive, meaning that a child class can also be assigned to the base class of its base class, an interface its base class implements, the base interface of an implementing interface, and so on.