Recover Scala 2 semantics for AnyVal
under -Ycompile-scala2-library
#22533
Labels
area:scala2-library-tasty
Any issue generaing or using the Scala 2 library TASTy
area:value-classes
Issues tied to value classes.
itype:bug
Following yesterday's Core Meeting Decision (#22493 (comment)), the semantics of value classes in Scala 2 and Scala 3 are different (only changes in
equals
andhashCode
). When compiling the common subset of the scala 3 stdlib (scala2 stdlib), we need to recover the old semantics. One way to do it, that doesn't require a compiler change is to define manually theequals
andhashCode
methods (which is possible in Scala 3, see #22494). I'm not a fan of it is very error-prone. A second approach is to recover the old semantics under the-Ycompile-scala2-library
, which is the one I'm adopting.The text was updated successfully, but these errors were encountered: