9f53d70109
This allows taking function references to inline array constructors. Also, redundant classes are no longer generated when function references are passed as arguments to the array constructors. #KT-46426 Fixed
12 lines
325 B
Kotlin
Vendored
12 lines
325 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
// IGNORE_BACKEND: JS_IR
|
|
|
|
fun createArray(ctor: (Int, (Int) -> Char) -> CharArray) =
|
|
ctor(1) { 'O' }
|
|
|
|
inline fun createArrayInline(ctor: (Int, (Int) -> Char) -> CharArray) =
|
|
ctor(1) { 'K' }
|
|
|
|
fun box(): String =
|
|
createArray(::CharArray)[0].toString() + createArrayInline(::CharArray)[0].toString()
|