boolean (@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, PsiElement lastParent, @NotNull PsiElement place) { if (lastParent == null) return true; ElementClassHint elementClassHint = processor.getHint(ElementClassHint.KEY); if (elementClassHint != null && !elementClassHint.shouldProcess(ElementClassHint.DeclarationKind.VARIABLE)) return true; PsiExpression condition = getCondition(); if (lastParent == getThenExpression()) { return condition.processDeclarations(processor, PatternResolveState.WHEN_TRUE.putInto(state), null, place); } if (lastParent == getElseExpression()) { return condition.processDeclarations(processor, PatternResolveState.WHEN_FALSE.putInto(state), null, place); } return true; }