[java][switch resolve] IDEA-273929 Good code red - cannot resolve symbol in switch statement group

The resolver used to fail when a case label element is parenthesized. The patch fixes this problem by stripping parens from a case element if necessary

GitOrigin-RevId: de2113905ccabcc7c675c94c320cb2b26fccf487
This commit is contained in:
Nikita Eshkeev
2021-08-02 22:25:40 +03:00
committed by intellij-monorepo-bot
parent 6be1da1730
commit a7100b4e2e
4 changed files with 36 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
class Main {
final int i = 2;
void f(Object obj) {
switch (obj) {
case Integer i, ((i<caret>)):
System.out.println(i);
}
}
}
}