mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
check for assignment to final field inside lambda (IDEA-123308)
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
class Test {
|
||||
private final int a;
|
||||
|
||||
public Test() {
|
||||
a = 1;
|
||||
run(() -> {
|
||||
<error descr="Cannot assign a value to final variable 'a'">a</error> = 2;
|
||||
});
|
||||
}
|
||||
|
||||
public void run(Runnable r) {
|
||||
r.run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user