Files
kotlin/compiler/testData/codegen/bytecodeText/ranges/inArrayIndices.kt
2020-02-20 14:20:21 +03:00

17 lines
443 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// TODO KT-36829 Optimize 'in' expressions in JVM_IR
fun testPrimitiveArray(i: Int, ints: IntArray) = i in ints.indices
fun testObjectArray(i: Int, xs: Array<Any>) = i in xs.indices
fun testLongWithPrimitiveArray(i: Long, ints: IntArray) = i in ints.indices
fun testLongWithObjectArray(i: Long, xs: Array<Any>) = i in xs.indices
// 0 getIndices
// 0 contains
// 2 I2L
// 4 ARRAYLENGTH
// 2 LCONST_0
// 6 ICONST_0