Scala trait linearization

ID: scala-trait-linearization

Scala orders a class and its inherited traits to resolve member lookup and super calls. For two independent traits sharing a base, the rightmost mixed-in trait comes first, followed by the earlier trait and then the common base. Ordinary virtual calls start at the receiver's most specific override; an unqualified super call starts after the implementation's owner in that receiver's linearization. It does not necessarily call the textual parent of the trait in isolation.[ref]

New to topics? Read the docs here!