mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 00:21:32 +00:00
11 lines
267 B
Kotlin
Vendored
11 lines
267 B
Kotlin
Vendored
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
|
|
fun foo(x: String, y: String = "K"): String = x + y
|
|
|
|
fun call(f: (String) -> String, x: String): String = f(x)
|
|
|
|
fun box(): String {
|
|
return call(::foo, "O")
|
|
}
|