Remove unnecessary parentheses: don't suggest when parentheses are for lambda

This commit is contained in:
Toshiaki Kameyama
2018-12-30 13:45:00 +09:00
committed by Mikhail Glukhikh
parent 05d8932fa6
commit 2010b1756e
5 changed files with 40 additions and 1 deletions
@@ -448,7 +448,7 @@ public class KtPsiUtil {
}
}
if (innerExpression instanceof KtLambdaExpression) {
if (innerExpression instanceof KtLambdaExpression || innerExpression.getFirstChild() instanceof KtLambdaExpression) {
PsiElement prevSibling = PsiTreeUtil.skipWhitespacesAndCommentsBackward(currentInner);
if (prevSibling != null && prevSibling.getText().endsWith(KtTokens.RPAR.getValue())) return true;
}