Files
kotlin/compiler/testData/codegen/boxInline/simple/vararg.kt
2018-08-02 13:19:24 +02:00

23 lines
336 B
Kotlin
Vendored

// FILE: 1.kt
// WITH_RUNTIME
package test
inline fun doSmth(vararg a: String) : String {
return a.foldRight("", { a, b -> a + b})
}
// FILE: 2.kt
import test.*
fun test1(): String {
return doSmth("O", "K")
}
fun box(): String {
val result = test1()
if (result != "OK") return "fail1: ${result}"
return "OK"
}