Files
kotlin/compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleDefaultArgument.kt
2019-11-19 11:00:09 +03:00

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")
}