Skip to content
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 return types on build() method (avoid having to cast after calling the build() method on a subclass) #1014

Conversation

dewthefifth
Copy link
Collaborator

The previous implementation required every call to build() on an inherited builder to cast the results or else store them in the base class. This change will add an overridden build() method to the children which casts the result of the original parent's build method.

@joelittlejohn
Copy link
Owner

Nice change, thanks!

@joelittlejohn joelittlejohn merged commit ac0663b into joelittlejohn:master Aug 9, 2019
@joelittlejohn joelittlejohn changed the title Feature/no more casting for builders Covariant return types on build() method (avoid having to cast after calling the build() method on a subclass) Aug 13, 2019
@joelittlejohn joelittlejohn added this to the 1.0.2 milestone Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants