Files
kotlin-fork/compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleDefaultArgument.kt
T
2020-02-19 18:09:06 +03:00

10 lines
237 B
Kotlin
Vendored

// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
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")
}