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: use a valid member to implement a super-accessor
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 to have the same bug (but at least in Dotty this
is detected by -Ycheck:all).
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.
This seems like it should be clarified to indicate that the member m'
may be found not only in "the actual supertype" (defined elsewhere) but
in any supertype of the actual supertype.
0 commit comments