JVM_IR: move ArrayConstructor below function reference phases
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
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// 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()
|
||||
}
|
||||
Reference in New Issue
Block a user