Allow overriding of automatically generated members of @data classes
florv opened this issue · comments
It would be nice if it was possible to override automatically generated members of @data
classes.
It will then be possible to compile something like this bare example:
@data class A(a: Int, b: Int) {
def toString(): String = {
"foo"
}
def copy()(implicit a: Allocator): A = {
A(a, b)
}
}
This makes sense, it shouldn't be hard to make macro annotations let user define their own implementations of some of the pre-generated methods.