1074a0ef69
- Added tests to demonstrate broken behaviour: the interaction of inline functions and callable references with varargs and defaults in various combinations. - Refactored InlineCallableReferencesToLambdaPhase to look like and use some of the infrastructure from CallableReferenceLowering. - Lifted some of this infrastructure out to be broadly reusable.
10 lines
274 B
Kotlin
Vendored
10 lines
274 B
Kotlin
Vendored
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
|
// IGNORE_BACKEND: JS, 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)
|