Files
openide/java/java-tests/testData/codeInsight/completion/normal/CompleteSwitchObjectSelectorPostfix.java
Nikita Eshkeev a4da031bdf [postfix completion] IDEA-277334 Java 17 support: Postfix .switch doesn't work when selector expression is Object
The switch statement postfix completion template used to be applied to either elements of the Object type or of a sealed class. This restriction was just a result of a mistake. This patch lifts this restriction and makes SwitchStatementPostfixTemplate truly DumbAware by resolving an expression's type with DumbModeAccessType bypassing the dumb mode if necessary.

GitOrigin-RevId: c2f82834ff4e6842d6d825f9ff994c288196291b
2021-09-10 16:46:29 +00:00

6 lines
63 B
Java

class Main {
int g(CharSequence o) {
o.swit<caret>
}
}