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
Compile with scalac -Yexplicit-nulls PosZLong.scala
Minimized from scalatest/scalactic.
Output
-- Error: PosZLong.scala:4:7 --------------------------------------------------------------------------------------------------------------
4 |object PosZLongOrd extends Ordering[PosZLong]:
| ^
|object creation impossible, since def compare(x$0: T | Null, x$1: T | Null): Int in trait Comparator in package java.util is not defined
|(The class implements a member with a different type: def compare(x: PosZLong, y: PosZLong): Int in object PosZLongOrd)
1 error found
Expectation
Should compile.
Fails to compile independently of language.unsafeNulls.