Commit Graph

2 Commits

Author SHA1 Message Date
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
Nikita Eshkeev
8df26f2b6f [postfix completion] IDEA-277334 Java 17 support: Postfix .switch doesn't work when selector expression is Object
Add tests for the switch postfix completion

GitOrigin-RevId: b1221d428e78221c3a2c3e128d24eefa4bd2bc0e
2021-09-09 10:03:29 +00:00