mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 08:18:29 +00:00
[fixes #3370] Support Helper in method
This commit is contained in:
1 parent
250bc0660b
commit
37ac1bf4cd
9 files changed
+55
-4
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import lombok.experimental.Helper;
|
||||
public class HelperInInitializationBlock {
|
||||
{
|
||||
final int z = 5;
|
||||
if (Boolean.TRUE)
|
||||
{
|
||||
@Helper class H1 {
|
||||
H1() {
|
||||
super();
|
||||
}
|
||||
void foo(int x) {
|
||||
System.out.println(("Hello, " + (x + z)));
|
||||
}
|
||||
}
|
||||
final H1 $H1 = new H1();
|
||||
$H1.foo(10);
|
||||
@Helper class H2 {
|
||||
H2() {
|
||||
super();
|
||||
}
|
||||
void bar() {
|
||||
$H1.foo(12);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public HelperInInitializationBlock() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user