Formatter: fix line break before OperationReference in elvis

#KT-22362 Fixed
This commit is contained in:
Dmitry Gridin
2019-11-01 15:50:39 +07:00
parent 247619c565
commit d321f4626f
4 changed files with 24 additions and 1 deletions
@@ -615,7 +615,7 @@ abstract class KotlinCommonBlock(
}
if (nodePsi.operationToken == ELVIS && nodePsi.getStrictParentOfType<KtStringTemplateExpression>() == null) {
return { childElement ->
if (childElement.elementType == OPERATION_REFERENCE) {
if (childElement.elementType == OPERATION_REFERENCE && (childElement.psi as? KtOperationReferenceExpression)?.operationSignTokenType == ELVIS) {
Wrap.createWrap(settings.kotlinCustomSettings.WRAP_ELVIS_EXPRESSIONS, true)
} else {
null