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#1392: Disallow super-calls that cannot be implemented correctly
A call `super[T].m` that resolves to `A.m` cannot be translated to
correct bytecode if `A` is a class (not a trait / interface), but not
the direct superclass. Invokespecial would select an overriding method
in the direct superclass, rather than `A.m`. We allow this if there are
statically no intervening overrides.
Based on
scala/scala@a980fde
and
scala/scala@0a84038
Note that unlike Scala 2 we do not need to check if the mixin part of a
Super is to a direct parent here because this is already done in
TypeAssigner.
Co-Authored-By: Jason Zaugg <[email protected]>
Co-Authored-By: Lukas Rytz <[email protected]>
overridedefm=super[T].m // error: Super call cannot be emitted: the selected method m is declared in class A, which is not the direct superclass of class C.
0 commit comments