mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ExpectedTypesProvider: fix switch expression handling
This commit is contained in:
@@ -351,10 +351,7 @@ public class ExpectedTypesProvider {
|
||||
if (statement.getParent() instanceof PsiSwitchLabeledRuleStatement) {
|
||||
PsiSwitchBlock block = ((PsiSwitchLabeledRuleStatement)statement.getParent()).getEnclosingSwitchBlock();
|
||||
if (block instanceof PsiSwitchExpression) {
|
||||
if (myForCompletion) {
|
||||
myExpr = (PsiSwitchExpression)block;
|
||||
}
|
||||
block.getParent().accept(this);
|
||||
Collections.addAll(myResult, getExpectedTypes((PsiExpression)block, myForCompletion));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user