PsiType (@NotNull PsiExpression match, @NotNull MatchContext context) { if (match instanceof PsiFunctionalExpression functionalExpression) { return functionalExpression.getFunctionalInterfaceType(); } else if (match instanceof PsiReferenceExpression && match.getParent() instanceof PsiMethodCallExpression call) { return call.getType(); } return match.getType(); }