Files
kotlin/compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleEmptyVararg.kt
2019-11-19 11:00:09 +03:00

13 lines
283 B
Kotlin
Vendored

// !LANGUAGE: +NewInference
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS
fun foo(x: String, vararg y: String): String =
if (y.size == 0) x + "K" else "Fail"
fun call(f: (String) -> String, x: String): String = f(x)
fun box(): String {
return call(::foo, "O")
}