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
11 lines
196 B
Kotlin
Vendored
11 lines
196 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
class C(val x: String) {
|
|
fun foo(i: Int): Char = x[i]
|
|
}
|
|
|
|
fun box(): String {
|
|
val array = CharArray(2, C("OK")::foo)
|
|
return array[0].toString() + array[1].toString()
|
|
}
|