mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
anonym -> lambda: accept refs to initialized final fields in classes inside constructors (IDEA-150322)
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
// "Replace with lambda" "true"
|
||||
class HelloLambda {
|
||||
public HelloLambda() {
|
||||
Runnable r = () -> System.out.println(x);
|
||||
}
|
||||
private final int x = 0;
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Replace with lambda" "true"
|
||||
class HelloLambda {
|
||||
public HelloLambda() {
|
||||
Runnable r = new Run<caret>nable() {
|
||||
@Override
|
||||
public void run () {
|
||||
System.out.println(x);
|
||||
}
|
||||
} ;
|
||||
}
|
||||
private final int x = 0;
|
||||
}
|
||||
Reference in New Issue
Block a user