-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Covariant builders - copy builder methods from superclass, with narrow return type #455
Comments
This sounds possible. I'm interested to know if this is something people regularly run in to, as no-one has mentioned this in the past. Rather than trying to find the setters, the simplest implementation would probably be:
|
@joelittlejohn Thanks for reply. |
Even better, I like it! On 1 December 2015 at 09:48, blizznets notifications@github.com wrote:
|
@joelittlejohn great! ) |
@blizznets I'm happy to accept a pull request if you want to fix this. |
@joelittlejohn ok ) |
Which part are you having trouble with? |
#455 Override builder methods from parent class
Closed by #458. |
In case I have, for example, super class for all my responses with such schema (Response.json):
and some response that extends it (SomeResponse.json):
builder method "withError" will be generated for Response only.
So I've got compilation error when tried to do something like this:
But if withError override in each subclass - it will work.
Is it possible to fix it?
Thanks a lot so helpfull tool!
The text was updated successfully, but these errors were encountered: