Files
kotlin-fork/js/js.translator/testData/expression/function/cases/implicitItParameter.kt
T
2014-03-11 20:04:00 +04:00

12 lines
223 B
Kotlin

package foo
fun test(f: (Int) -> Boolean, p: Int) = f(p)
fun box(): Boolean {
if (!test({ it + 1 == 2 }, 1)) return false;
if (!test({ it > 1 }, 3)) return false;
return (test({ ((it < 1) == false) }, 1))
}