Don't wrap argument list containing anonymous functions
Just like for objects and lambdas, don't consider line breaks inside anonymous functions as line breaks inside argument list
This commit is contained in:
@@ -581,6 +581,13 @@ private fun excludeLambdasAndObjects(parent: ASTBlock): List<TextRange> {
|
||||
super.visitObjectLiteralExpression(expression)
|
||||
rangesToExclude.add(expression.textRange)
|
||||
}
|
||||
|
||||
override fun visitNamedFunction(function: KtNamedFunction) {
|
||||
super.visitNamedFunction(function)
|
||||
if (function.name == null) {
|
||||
rangesToExclude.add(function.textRange)
|
||||
}
|
||||
}
|
||||
})
|
||||
return TextRangeUtil.excludeRanges(parent.textRange, rangesToExclude).toList()
|
||||
}
|
||||
|
||||
@@ -14,6 +14,10 @@ fun main(args: Array<String>) {
|
||||
println("Hello world")
|
||||
}
|
||||
})
|
||||
|
||||
useCallable("B", fun() {
|
||||
println("Hello world")
|
||||
})
|
||||
}
|
||||
|
||||
// SET_TRUE: CALL_PARAMETERS_LPAREN_ON_NEXT_LINE
|
||||
|
||||
@@ -14,6 +14,10 @@ fun main(args: Array<String>) {
|
||||
println("Hello world")
|
||||
}
|
||||
})
|
||||
|
||||
useCallable("B", fun() {
|
||||
println("Hello world")
|
||||
})
|
||||
}
|
||||
|
||||
// SET_TRUE: CALL_PARAMETERS_LPAREN_ON_NEXT_LINE
|
||||
|
||||
Reference in New Issue
Block a user