Files
kotlin-fork/idea/testData/refactoring/extractFunction/parameters/it/lambdaWithIt.kt
T

10 lines
308 B
Kotlin

// PARAM_TYPES: kotlin.Array<kotlin.Int>
// PARAM_DESCRIPTOR: value-parameter val t: kotlin.Array<kotlin.Int> defined in foo
fun <T> Array<T>.check(f: (T) -> Boolean): Boolean = false
// SIBLING:
fun foo(t: Array<Int>) {
if (<selection>t.check { it + 1 > 1 }</selection>) {
println("OK")
}
}