Files
kotlin-fork/compiler/testData/codegen/box/callableReference/adaptedReferences/emptyVarargAndDefault.kt
T
2020-11-09 16:04:43 +03:00

13 lines
330 B
Kotlin
Vendored

// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: IGNORED_IN_JS
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
fun foo(x: String = "O", vararg y: String): String =
if (y.size == 0) x + "K" else "Fail"
fun call(f: () -> String): String = f()
fun box(): String {
return call(::foo)
}