-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not generate withField
methods if they are already defined
#9
Comments
I agree this would be convenient, but it's kind of tricky to achieve in practice. Trickier than Because users may decide to add extra convenient import java.io.File
@data class Foo(file: File) {
def withFile(file: String): Foo =
withFile(new File(file))
} My understanding is that the macros of data-class run before the type checker, so in that case we have no way of knowing for sure if a But maybe adding a @data class Foo(@nosetter bar: String, baz: Int) {
def withBar(bar: String): Foo = ???
} |
does not work, maybe this should?
I would expect
withBaz
to be generated, but not withBarThe text was updated successfully, but these errors were encountered: