Files
kotlin-fork/idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/applicable_inWhenEntry.kt
T
2020-06-24 14:55:30 +02:00

10 lines
217 B
Kotlin
Vendored

fun test(v: Boolean): (String) -> Int {
return when (v) {
true -> { { <caret>x -> taskOne(x) } }
false -> { x -> taskTwo(x) }
}
}
fun taskOne(s: String) = s.length
fun taskTwo(s: String) = 42