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

13 lines
315 B
Kotlin
Vendored

// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
// IGNORE_BACKEND: JS_IR
inline fun foo(mkString: () -> String): String =
mkString()
fun bar (xs: CharArray = charArrayOf('O','K')) =
String(xs)
fun box(): String = foo(::bar)