Extract Function: Support extraction of "it" parameter from lambdas

This commit is contained in:
Alexey Sedunov
2014-06-19 16:17:52 +04:00
parent 14362134bd
commit a3f215fb34
11 changed files with 138 additions and 6 deletions
@@ -0,0 +1,9 @@
// PARAM_TYPES: kotlin.Array<kotlin.Int>
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")
}
}