You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#5433: check that the implemented super-accessor is valid
Relying on `matchingDenotation` is not enough as demonstrated by
i5433.scala: in `Fail`, `B#foo` matches `C$$super$foo`
but it cannot implement it since `X` is a supertype of `Y`
Note that scalac seems had the same bug (but at least in Dotty this is
detected by -Ycheck:all), now fixed based on the logic in this PR by
scala/scala#7641.
For reference, here's what the spec says on resolving super accessors:
A reference super.m refers statically to a method or type m in the
least proper supertype of the innermost template containing the
reference. It evaluates to the member m′ in the actual supertype of that
template which is equal to m or which overrides m.
0 commit comments