mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 22:17:41 +00:00
[fixes #2300] Keep method argument positions for lazy getter initializer
This commit is contained in:
1 parent
ce92389da7
commit
b1f6372b35
4 files changed
+241
No files matched your search
@@ -0,0 +1,21 @@
|
||||
// version 8:
|
||||
class GetterLazyArguments {
|
||||
static String fun() { return null; }
|
||||
static String stringInt(String arg1, Integer arg2) { return null; }
|
||||
static String stringRunnable(String arg1, Runnable arg2) { return null; }
|
||||
|
||||
@lombok.Getter(lazy=true)
|
||||
private final String field1 = stringInt(("a"), (1));
|
||||
|
||||
@lombok.Getter(lazy=true)
|
||||
private final String field2 = stringInt(true ? "a" : "b", true ? 1 : 0);
|
||||
|
||||
@lombok.Getter(lazy=true)
|
||||
private final String field3 = stringInt(("a"), true ? 1 : 0);
|
||||
|
||||
@lombok.Getter(lazy=true)
|
||||
private final String field4 = stringRunnable(fun(), () -> { });
|
||||
|
||||
@lombok.Getter(lazy=true)
|
||||
private final String field5 = stringRunnable(("a"), () -> { });
|
||||
}
|
||||
Reference in new issue
Block a user