Files
kotlin-fork/compiler/testData/ir/irText/firProblems/V8ArrayToList.kt
T
vladislav.grechko 9aa8fb80e7 Set correct IR origins for inc/dec operations
NB: in order to produce correct IR origins, the source element kinds for
some FIR elements has been changed. As a side effect, mapping PSI to FIR
slightly changed: namely, for `a[b]++`, `a[b]` used to be mapped on
`set` call or callable reference, but now it is mapped on `get` call.

^KT-61891: Fixed
^KT-64387: Fixed
2024-01-30 14:26:10 +00:00

23 lines
446 B
Kotlin
Vendored

// FIR_IDENTICAL
// TARGET_BACKEND: JVM
// FILE: Utils.java
import java.util.*;
public class Utils {
public static List<? super Object> toList(final V8Array array) {
List<? super Object> list = new ArrayList<Object>();
list.add("OK");
return list;
}
}
// FILE: v8arrayToList.kt
class V8Array
fun box(): String {
val array = V8Array()
val list = Utils.toList(array) as List<String>
return list[0]
}