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
[BUG] SuperBuilder's builder method with unbound generics forces casting down the route... #3445
Comments
#2708, eventually related to this issue |
The |
Thanks for the prompt answer. Yes, it's Indeed, the delomboked code shows that Let me show you the relevant code:
If the |
I cannot reproduce this. This code compiles perfectly with both Eclipse and javac:
I'm not using IntelliJ, maybe it's a problem just for the IntelliJ compiler? |
I'll double check in 3 weeks... thanks so far for retesting. |
Describe the bug
The
builder()
method of@SuperBuilder
returns a Builder with unbound generics, which causes problems down the lane.a Test method:
The problematic delomboked Vanilla code:
Workaround
I have to cast the result of the builder, which is quite ugly and cumbersome:
Or I could provide my own implementation of builder without generics in every
@SuperBuilder
annotated class:This does not work for
toBuilder()
tough, which has the same problem...Expected behavior
I would like to have no generics at all, or properly bound generics for the above case to work.
Version info :
The text was updated successfully, but these errors were encountered: