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

[BUG] lombok.fieldDefaults.defaultPrivate with records results in "@FieldDefaults is only supported on a class or an enum" #3094

Closed
kanimaru opened this issue Jan 24, 2022 · 1 comment

Comments

@kanimaru
Copy link

Describe the bug
When you use Java 14 records and also the configuration that every field is default private you can't compile the code. Cause the Intellij build process aborts with this error java: @FieldDefaults is only supported on a class or an enum.

To Reproduce
lombok.config with:
lombok.fieldDefaults.defaultPrivate=true

a record with:
public record SomeRecord(String identifier) {}

javac -cp lombok-1.18.22.jar SomeRecord.java

Result:

SomeRecord.java:6: error: @FieldDefaults is only supported on a class or an enum.
public record SomeRecord(String identifier) {
       ^
1 error

Expected behavior
It should compile :)

Version info (please complete the following information):

@Rawi01
Copy link
Collaborator

Rawi01 commented Jan 24, 2022

Duplicate of #2995 and fixed in the current edge version

@Rawi01 Rawi01 closed this as completed Jan 24, 2022
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

No branches or pull requests

2 participants