mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
13 lines
312 B
Kotlin
Vendored
13 lines
312 B
Kotlin
Vendored
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// IGNORE_BACKEND: JS
|
|
|
|
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)
|
|
}
|