PsiType (@NotNull PsiExpression expression) { PsiType type = expression.getType(); if (type == null) return null; int rank = TypeConversionUtil.getTypeRank(type); if (rank < TypeConversionUtil.INT_RANK || rank > TypeConversionUtil.DOUBLE_RANK) return null; return !disableForNonIntegralTypes || rank <= TypeConversionUtil.LONG_RANK ? type : null; }