Files
openide/java/java-tests/testData/codeInsight/gotoDeclaration/PatternMatchingGuardInSwitchStatement.java
Nikita Eshkeev 5fe869da3b [java][switch resolve] IDEA-273929 Good code red - cannot resolve symbol in switch statement group
Check if the being resolved element is in the list of case label elements first and only if it's not, go deeper into case label elements' resolvers.

GitOrigin-RevId: 63280ccb3bbf95660c5f74f35dc5de4cf34752b6
2021-08-02 13:27:26 +00:00

11 lines
157 B
Java

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