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
No mixin forwarders for known binary incompatible trait overrides
New overrides added to traits are not forwards binary compatible
(scala/bug#12137).
For those overrides that were added since 2.12.0, a new special case
in Mixin avoids generating the mixin forwarder, so compiling with
2.12.13 will emit code that is binary compatible with 2.12.0.
Tested with this code:
```
object A extends scala.math.Ordering.IntOrdering // `reverse` override was added
object B extends scala.math.Ordering.FloatOrdering // `reverse` override was removed
object Test {
def main(args: Array[String]): Unit = {
println(A.reverse)
println(B.reverse)
}
}
```
Code compiled with 2.12.13 (qsc/qs) works with all 2.12 libraries
thanks to this fix.
```
qsc Test.scala && sv 2.12.0 Test && sv 2.12.12 Test && qs Test
```
Code compiled with 2.12.0 fails on 2.12.12. The super call in the
generated mixin forwarder `B.reverse` invokes the static method
`FloatOrdering.reverse$` that no longer exists. This will be the same
in 2.12.13.
```
scv 2.12.0 Test.scala && sv 2.12.12 Test
java.lang.NoSuchMethodError: scala.math.Ordering$FloatOrdering.reverse$
```
0 commit comments