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] @ExtensionMethod on records #3450

Closed
ZeeD opened this issue Jul 3, 2023 · 1 comment · Fixed by #3479
Closed

[BUG] @ExtensionMethod on records #3450

ZeeD opened this issue Jul 3, 2023 · 1 comment · Fixed by #3479
Assignees
Milestone

Comments

@ZeeD
Copy link

ZeeD commented Jul 3, 2023

Describe the bug
The bug is a different behavior between the eclipse plugin and the maven one: on eclipse it seems possible (i get no errors) using @ExtensionMethod on a record, while on maven I get:
@ExtensionMethod can only be used on a class or an enum or an interface

Generally speaking I want to be able to use ExtensionMethod even on records.

To Reproduce
A simple example of the scenario:

import lombok.experimental.ExtensionMethod;

@ExtensionMethod(String.class) // access String.join(delimiter, ...) as delimiter.join(...)
public record MyRecord(String foo, String bar) {
    String baz() {
        return "\n".join(foo, bar);
    }
}

Expected behavior
I can use mvn to build. At the moment my project relies on the version 1.18.28 of lombok

@ZeeD
Copy link
Author

ZeeD commented Sep 17, 2023

Thanks!!!

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

Successfully merging a pull request may close this issue.

3 participants