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
When I create type hierarchies of data-types with chainable setters, setting a property on the superclass will return the type of the superclass. This means that I cannot subsequently call methods on the subclass. As Java supports covariant return types, this can be fixed with a simple matter of code generation
When I create type hierarchies of data-types with chainable setters, setting a property on the superclass will return the type of the superclass. This means that I cannot subsequently call methods on the subclass. As Java supports covariant return types, this can be fixed with a simple matter of code generation
Describe the feature
Considering the following classes
Given
lombok.accessor.chain=true
, the following compiles:But this does not compile, because
setName
has return typePet
:Either by default or with a flag, the following code could be generated:
Describe the target audience
This is useful for Data classes in hierarchies with chaining setters.
The text was updated successfully, but these errors were encountered: