Class SamenessAbove

java.lang.Object
org.ek9lang.compiler.support.sameness.SamenessAbove

final class SamenessAbove extends Object
THE walk behind InheritedSameness, SealedSameness and SortOwnerAbove: the first sameness above a type (its supers and traits, breadth first, each once) whose declaring type passes an owner test. A parameterised type is looked through to its generic, whose declared operators it carries - in EXPLICIT_TYPE_SYMBOL_DEFINITION a parameterisation may have no members yet, and a plain and a generic super must give the same answer (D24, scenarios s01a/s01b).

DEFENSIVE: this runs at the end of EXPLICIT_TYPE_SYMBOL_DEFINITION, before TYPE_HIERARCHY_CHECKS reports a circular hierarchy, so it walks with its own visited set rather than getAllTraits() (which recurses without one and overflowed on a loop). A broken hierarchy must neither error nor crash here.