Files
kotlin-fork/compiler/testData/codegen/box/callableReference/varargAndDefaults/inline.kt
T
2019-08-16 18:32:19 +03:00

10 lines
282 B
Kotlin
Vendored

// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
// IGNORE_BACKEND: JS, JVM_IR, JS_IR
fun foo(vararg l: Long, s: String = "OK"): String =
if (l.size == 0) s else "Fail"
inline fun bar(f: () -> String): String = f()
fun box(): String = bar(::foo)