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
scala>newV(newX) ==newV(newX)
res2:Boolean=false
scala>classX { def==(other: X) =??? }
defined classX
scala>classV(valx:X) extendsAnyVal
defined classV
scala>newV(newX) ==newV(newX)
scala.NotImplementedError: an implementation is missing
at scala.Predef$.$qmark$qmark$qmark(Predef.scala:243)
at X.$eq$eq(<console>:8)
at .<init>(<console>:10)
I'd expect this to dispatch to Any#==.
The text was updated successfully, but these errors were encountered:
@odersky said:
In fact, the behavior is consistent with case classes. Both forward to a method named ==, not necessarily Any_==. I sharpened the test in posterasure according to the suggestion.
Inspired by #6072:
I'd expect this to dispatch to
Any#==
.The text was updated successfully, but these errors were encountered: