Files
kotlin-fork/idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinTo.kt
T
Mikhail Glukhikh d08b18f5f8 Introduce "use expression body" inspection #KT-16063 Fixed
Converted from the relevant intention
Reported cases: one-liners, whens
Also, more exact caret detection in local inspection tests
2017-07-07 18:15:06 +03:00

4 lines
144 B
Kotlin
Vendored

// WITH_RUNTIME
val sb = StringBuilder()
val x = listOf(1, 2, 3).<caret>map { "$it*$it" }.joinTo(buffer = sb, prefix = "= ", separator = " + ")