mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 15:41:26 +07:00
copy to temp/array for non-effectively final variables used in lambda expressions
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// "Copy 'a' to temp final variable" "true"
|
||||
class Test {
|
||||
public void test() {
|
||||
int a = 1;
|
||||
a = 2;
|
||||
final int finalA = a;
|
||||
Runnable r = () -> {
|
||||
System.out.println(finalA);
|
||||
};
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Copy 'a' to temp final variable" "true"
|
||||
class Test {
|
||||
public void test() {
|
||||
int a = 1;
|
||||
a = 2;
|
||||
Runnable r = () -> {
|
||||
System.out.println(<caret>a);
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user