Files
kotlin-fork/compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineVarargAndDefault.kt
T
2021-02-09 17:23:19 +05:00

15 lines
309 B
Kotlin
Vendored

// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
// FILE: 1.kt
package test
inline fun foo(vararg l: Long, s: String = "OK"): String =
if (l.size == 0) s else "Fail"
inline fun bar(f: () -> String): String = f()
// FILE: 2.kt
import test.*
fun box(): String = bar(::foo)