mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 00:21:29 +00:00
13 lines
317 B
Kotlin
Vendored
13 lines
317 B
Kotlin
Vendored
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// IGNORE_BACKEND: JS
|
|
|
|
fun foo(vararg a: String, result: String = "OK"): String =
|
|
if (a.size == 0) result else "Fail"
|
|
|
|
fun call(f: () -> String): String = f()
|
|
|
|
fun box(): String {
|
|
return call(::foo)
|
|
}
|