Split property declaration: don't add parentheses for anonymous function
#KT-7593 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
c1f75d2324
commit
ea0f9d124d
@@ -495,6 +495,14 @@ public class KtPsiUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 'x = fun {}' case
|
||||
if (parentElement instanceof KtBinaryExpression &&
|
||||
parentOperation == KtTokens.EQ &&
|
||||
innerExpression instanceof KtNamedFunction &&
|
||||
currentInner == ((KtBinaryExpression) parentElement).getRight()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (innerExpression instanceof KtBinaryExpression) {
|
||||
// '(x operator return [...]) operator ...' case
|
||||
if (parentElement instanceof KtBinaryExpression) {
|
||||
|
||||
Reference in New Issue
Block a user