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
A method named copy is implicitly added to every case class unless the class already has a member (directly defined or inherited) with that name
It seems compiler adds a synthetic copy in spite of one being defined by me. If this is intended, documentation should be updated, but I do not remember reading about such change from Scala 2 to Scala 3.
Compiler version
3.0.0
3.5.2
Minimized code
Output
Expectation
The second variant should not compile, as it does not compile in Scala 2.13.15.
Specs say in https://scala-lang.org/files/archive/spec/3.4/05-classes-and-objects.html:
It seems compiler adds a synthetic copy in spite of one being defined by me. If this is intended, documentation should be updated, but I do not remember reading about such change from Scala 2 to Scala 3.
Note
This was encountered in softwaremill/quicklens#256
The text was updated successfully, but these errors were encountered: