-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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] @Delegate misbehaves in anonymous classes #3240
Comments
A clearer error message produced with javac 17.0.4:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
@Delegate
on a field within an anonymous class returned by a method won't compile if that method has parameters.This started happening in the newer Lombok versions, at least since 1.18.22.
To Reproduce
Consider this example:
This doesn't compile with newer lombok versions. If we remove
String param
– it works.Compilation error:
Expected behavior
@Delegate
annotation in anonymous classes should work regardless of how their outer methods are defined.Version info
Reproduces with Lombok v1.18.22 and higher. Works fine with lombok 1.18.12.
Javac: 11.0.13, also reproduces with newer versions.
The text was updated successfully, but these errors were encountered: