mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 04:21:24 +07:00
[java] effectively final: ensure checks are performed on the same variable
GitOrigin-RevId: 77dc60e5a5119eecdd73268e192bd52390dff342
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d3f5af9da9
commit
8bb3536c11
@@ -69,6 +69,15 @@ public class XXX {
|
||||
int y;
|
||||
foo(() -> <error descr="Variable used in lambda expression should be final or effectively final">y</error>=1);
|
||||
}
|
||||
|
||||
void m9() {
|
||||
int x = 42;
|
||||
for (int i = 0; i < 2; i++) {
|
||||
x = x + 42;
|
||||
}
|
||||
int y = 5;
|
||||
foo(() -> y);
|
||||
}
|
||||
}
|
||||
|
||||
class Sample {
|
||||
|
||||
Reference in New Issue
Block a user