BooleanExpressionKind (PsiExpression expression) { if ((expression instanceof PsiPrefixExpression || expression instanceof PsiPolyadicExpression) && containsEscapingPatternVariable(expression)) { return BooleanExpressionKind.UNKNOWN; } if (expression instanceof PsiPrefixExpression || expression instanceof PsiAssignmentExpression) { return evaluate(expression) != null ? BooleanExpressionKind.USELESS : BooleanExpressionKind.UNKNOWN; } if (expression instanceof PsiPolyadicExpression polyadicExpression) { return getPolyadicKind(polyadicExpression); } return BooleanExpressionKind.UNKNOWN; }