mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 07:40:42 +07:00
IDEA-223192 Non-initialized variable error is not displayed in nested switch statement
GitOrigin-RevId: 850afa74fb22dd858bdc8ff7903946678e53d82c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
46cf985f64
commit
acb3387b1c
+18
-1
@@ -261,4 +261,21 @@ class ParenthesizedThis {
|
||||
(this).x = 5; // javac disallows this -- probably a bug in javac
|
||||
<error descr="Variable 'x' might already have been assigned to">this.x</error> = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class NestedSwitch {
|
||||
public static void main(String[] args) {
|
||||
for(int i = 0; i < 8; i++) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
switch (i+1) {
|
||||
default:
|
||||
final int var;
|
||||
<error descr="Variable 'var' might not have been initialized">var</error>++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user