Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/Jet121.kt
T
Andrey Breslav 3d8d92c7d3 JetDiagnosticsTest migrated to TestGenerator
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00

15 lines
220 B
Kotlin

package jet121
fun box() : String {
val answer = apply("OK") { String.() : Int ->
get(0)
length
}
return if (answer == 2) "OK" else "FAIL"
}
fun apply(arg:String, f : String.() -> Int) : Int {
return arg.f()
}