mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 19:28:23 +07:00
Also: fix for var types Fixes IDEA-374029 "Make effectively final" generates uncompilable code GitOrigin-RevId: 17932aefe036dec167aabaf2066c4cdff11947da
10 lines
243 B
Java
10 lines
243 B
Java
// "Make 'x' effectively final by moving initializer to the 'if' statement" "true-preview"
|
|
class Abc {
|
|
void test() {
|
|
var x = 5;
|
|
if (Math.random() > 0.5) {
|
|
x = 10;
|
|
}
|
|
Runnable r = () -> System.out.println(<caret>x);
|
|
}
|
|
} |