Files
kotlin-fork/js/js.translator/testFiles/extensionFunction/cases/extensionLiteralPassedToFunction.kt
T
2012-02-27 21:55:58 +04:00

7 lines
132 B
Kotlin

package foo
fun apply(i : Int, f : Int.(Int) -> Int) = i.f(1);
fun box() : Boolean {
return (apply(1, {i -> i + this})) == 2
}