Files
kotlin-fork/compiler/testData/codegen/box/callableReference/adaptedReferences/simpleDefaultArgument.kt
T
Alexander Udalov fa879e667f Add some tests on adapted references with varargs and reflection
Also rename "varargAndDefaults" test directory to "adaptedReferences"
2020-04-08 19:15:40 +02: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")
}