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.
12 lines
266 B
Kotlin
Vendored
12 lines
266 B
Kotlin
Vendored
// !LANGUAGE: +NewInference
|
|
// WITH_RUNTIME
|
|
// IGNORE_BACKEND: JS, JS_IR
|
|
|
|
inline fun foo(mkString: (Char, Char) -> String): String =
|
|
mkString('O','K')
|
|
|
|
fun bar (vararg xs: Char) =
|
|
String(xs)
|
|
|
|
fun box(): String = foo(::bar)
|
|
// -> { a, b -> bar(a, b) } |