[FIR IDE] Initial descriptor-based implementation of the Analysis API

This commit is contained in:
Yan Zhulanow
2021-10-05 19:15:01 +09:00
committed by teamcityserver
parent e2c9be0932
commit 516dd825c2
150 changed files with 9228 additions and 36 deletions
@@ -591,6 +591,10 @@ public class KtPsiUtil {
((KtBinaryExpression) element).getOperationToken().equals(KtTokens.EQ);
}
public static boolean isCast(@NotNull KtBinaryExpressionWithTypeRHS expression) {
return isSafeCast(expression) || isUnsafeCast(expression);
}
public static boolean isSafeCast(@NotNull KtBinaryExpressionWithTypeRHS expression) {
return expression.getOperationReference().getReferencedNameElementType() == KtTokens.AS_SAFE;
}