Files
kotlin-fork/compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleEmptyVararg.kt
T
Roman Artemev 7f215d3f52 Update tests
2018-11-01 16:51:38 +03:00

12 lines
261 B
Kotlin
Vendored

// !LANGUAGE: +NewInference
// IGNORE_BACKEND: JS, JVM_IR
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")
}