Files
kotlin-fork/idea/testData/formatter/callChain/NotCallChain.kt
T
Dmitry Gridin feaa53c4f2 Formatter: shouldn't format property chains
#KT-36387 Fixed
#KT-36466 Fixed
2020-02-25 16:48:33 +07:00

29 lines
377 B
Kotlin
Vendored

fun foo() {
listOf(42).map { it }
bar(A().b.toString())
"hello".length
}
fun bar(x: Int) {
}
class A {
val b: B = B()
}
class B {
val c: Int = 42
}
fun usage() {
data class A(val i: Int) {
fun doSmth(): A = this
}
val a = A(10)
a.doSmth().i
}
// SET_INT: METHOD_CALL_CHAIN_WRAP = 2
// SET_TRUE: WRAP_FIRST_METHOD_IN_CALL_CHAIN