OverridingPairsChecker
dotty.tools.dotc.typer.RefChecks.OverridingPairsChecker
class OverridingPairsChecker(clazz: ClassSymbol, self: Type)(using x$3: Context) extends Cursor
A class for checking all overriding pairs of class with a given check function
Attributes
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
We can exclude pairs safely from checking only under three additional conditions
We can exclude pairs safely from checking only under three additional conditions
- their signatures also match in the parent class. See neg/i12828.scala for an example where this matters.
- They overriding/overridden appear in linearization order. See neg/i5094.scala for an example where this matters.
- They overriding/overridden appear in linearization order, or the parent is a Java class (because linearization does not apply to java classes). See neg/i5094.scala and pos/i18654.scala for examples where this matters.
- The overridden symbol is not
abstract override. For such symbols we need a more extensive test since the virtual super chain depends on the precise linearization order, which might be different for the subclass. See neg/i14415.scala.
Attributes
- Definition Classes
Does sym1 match sym2 so that it qualifies as overriding when both symbols are seen as members of self? Types always match. Term symbols match if their membertypes relative to self do.
Does sym1 match sym2 so that it qualifies as overriding when both symbols are seen as members of self? Types always match. Term symbols match if their membertypes relative to self do.
Attributes
- Definition Classes
Inherited fields
If not null: The symbol overridden by overriding
The current candidate symbol for overriding
In this article