mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
11 lines
297 B
Kotlin
Vendored
11 lines
297 B
Kotlin
Vendored
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// IGNORE_BACKEND: JS
|
|
|
|
fun foo(vararg l: Long, s: String = "OK"): String =
|
|
if (l.size == 0) s else "Fail"
|
|
|
|
inline fun bar(f: () -> String): String = f()
|
|
|
|
fun box(): String = bar(::foo)
|