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 does work on classes named B or C #2297
Comments
Could you provide a small sample the reproduces that behaviour you've described? |
If you insist ;-)
|
I'm not too worried about classes named B, but... how about:
Looks like you're already working on a PR; should I wait for you to finish this? |
The type parameters on the class are OK, those are already checked against collisions. It's just the class name or classes referenced e.g. by fields (e.g. I'm also not sure if it's worth the effort: Checking just the class name is easy (my commit already does that), but for referenced classes we'd have to go through the complete source of the compilation unit to find possible collisions. I don't know the performance impact of that. And naming classes |
Describe the bug
@SuperBuilder
causes a compilation error when used on classes namedB
orC
.To Reproduce
Put
@SuperBuilder
on a class namedB
orC
.Expected behavior
Compiles.
Version info:
Additional context
Right now lombok only avoids name clashes between builder generics and the class's type parameters. When I implemented
@SuperBuilder
, I forgot to also check for clashes with the class name itself. :(The text was updated successfully, but these errors were encountered: