KT-19896: Fix force parenthesizing of multiline elvis

#KT-19896 fixed
This commit is contained in:
Simon Ogorodnik
2017-08-24 16:02:12 +03:00
parent c163e71662
commit ff4f928420
@@ -530,7 +530,10 @@ public class KtPsiUtil {
return false;
}
if (innerExpression instanceof KtBinaryExpression && isKeepBinaryExpressionParenthesized((KtBinaryExpression) innerExpression)) {
// '(x operator y)' case
if (innerExpression instanceof KtBinaryExpression &&
innerOperation != KtTokens.ELVIS &&
isKeepBinaryExpressionParenthesized((KtBinaryExpression) innerExpression)) {
return true;
}