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
But this is just an illusion: in scalac, the unbox call is actually replaced by BoxesRunTime.unboxToDouble(null). Dotty does not do this replacement and so the call fails with a NullPointerException.
This code:
Is transformed both in
scalac
and dotty into:But this is just an illusion: in
scalac
, theunbox
call is actually replaced byBoxesRunTime.unboxToDouble(null)
. Dotty does not do this replacement and so the call fails with aNullPointerException
.(I still wonder why there even is an implementation in Double.scala since it's both unused and incorrect: https://github.com/scala/scala/blob/2.11.x/src/library/scala/Double.scala#L244)
The text was updated successfully, but these errors were encountered: