-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:scala2-library-tastyAny issue generaing or using the Scala 2 library TASTyAny issue generaing or using the Scala 2 library TASTyarea:value-classesIssues tied to value classes.Issues tied to value classes.itype:bug
Milestone
Description
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
and hashCode
). 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 the equals
and hashCode
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.
Metadata
Metadata
Assignees
Labels
area:scala2-library-tastyAny issue generaing or using the Scala 2 library TASTyAny issue generaing or using the Scala 2 library TASTyarea:value-classesIssues tied to value classes.Issues tied to value classes.itype:bug