File tree Expand file tree Collapse file tree
core/src/main/java/com/facebook/ktfmt/format Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1705,14 +1705,14 @@ class KotlinInputAstVisitor(
17051705 */
17061706 @OptIn(ExperimentalContracts ::class )
17071707 private fun isBlockLikeCall (expression : KtExpression ? ): Boolean {
1708- contract { returns(true ) implies (expression is KtCallExpression ) }
1709-
17101708 if (expression == null ) return false
17111709 val prev = expression.getPrevSiblingIgnoringWhitespace()
17121710 if (prev is PsiComment ) {
17131711 return false // Leading comments cause weird indentation; keep the default layout.
17141712 }
17151713
1714+ if (expression is KtCollectionLiteralExpression ) return expression.parent !is KtValueArgument
1715+
17161716 if (expression !is KtCallExpression ) return false
17171717 val valueArgumentList = expression.valueArgumentList ? : return false
17181718 if (valueArgumentList.trailingComma != null ) return true
You can’t perform that action at this time.
0 commit comments