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
We'd like to eventually make something that was a case class a trait. So we'd like to be able to deprecate at least some of the methods that case classes generate.
In our case, the only important method to deprecate is the constructor - there's no reason to use the extractor or copy methods on this particular class, but the constructor is definitely used. So our specific problem would be solved if doing this:
caseclassFoo@deprecated(...) (bar: String)
resulted in the Foo.apply method being deprecated. More generally it would also be nice to be able to deprecate the unapply and copy methods. Currently it seems the only way to deprecate any of these methods is to manually implement the entire case class, and then apply the @deprecated annotation to the methods.
The text was updated successfully, but these errors were encountered:
We'd like to eventually make something that was a case class a trait. So we'd like to be able to deprecate at least some of the methods that case classes generate.
In our case, the only important method to deprecate is the constructor - there's no reason to use the extractor or copy methods on this particular class, but the constructor is definitely used. So our specific problem would be solved if doing this:
resulted in the
Foo.apply
method being deprecated. More generally it would also be nice to be able to deprecate theunapply
andcopy
methods. Currently it seems the only way to deprecate any of these methods is to manually implement the entire case class, and then apply the@deprecated
annotation to the methods.The text was updated successfully, but these errors were encountered: