diff --git a/compiler/testData/codegen/bytecodeText/ranges/inArrayIndices.kt b/compiler/testData/codegen/bytecodeText/ranges/inArrayIndices.kt index 64657d9d6b9..05635c78907 100644 --- a/compiler/testData/codegen/bytecodeText/ranges/inArrayIndices.kt +++ b/compiler/testData/codegen/bytecodeText/ranges/inArrayIndices.kt @@ -4,6 +4,11 @@ fun testPrimitiveArray(i: Int, ints: IntArray) = i in ints.indices fun testObjectArray(i: Int, xs: Array) = i in xs.indices +fun testLongWithPrimitiveArray(i: Long, ints: IntArray) = i in ints.indices + +fun testLongWithObjectArray(i: Long, xs: Array) = i in xs.indices + // 0 INVOKESTATIC kotlin/collections/ArraysKt.getIndices // 0 INVOKEVIRTUAL kotlin/ranges/IntRange.contains -// 2 ARRAYLENGTH +// 4 I2L +// 4 ARRAYLENGTH diff --git a/compiler/testData/codegen/bytecodeText/ranges/inCharSequenceIndices.kt b/compiler/testData/codegen/bytecodeText/ranges/inCharSequenceIndices.kt index e129b4c315c..fc78cfb3043 100644 --- a/compiler/testData/codegen/bytecodeText/ranges/inCharSequenceIndices.kt +++ b/compiler/testData/codegen/bytecodeText/ranges/inCharSequenceIndices.kt @@ -2,7 +2,10 @@ fun testCharSequence(i: Int, cs: CharSequence) = i in cs.indices +fun testLongWithCharSequence(i: Long, cs: CharSequence) = i in cs.indices + // 0 INVOKESTATIC kotlin/text/StringsKt.getIndices // 0 INVOKEVIRTUAL kotlin/ranges/IntRange.contains -// 1 INVOKEINTERFACE java/lang/CharSequence.length +// 2 INVOKEINTERFACE java/lang/CharSequence.length +// 2 I2L diff --git a/compiler/testData/codegen/bytecodeText/ranges/inCollectionIndices.kt b/compiler/testData/codegen/bytecodeText/ranges/inCollectionIndices.kt index 24dd9fa2b2f..6aaf240475a 100644 --- a/compiler/testData/codegen/bytecodeText/ranges/inCollectionIndices.kt +++ b/compiler/testData/codegen/bytecodeText/ranges/inCollectionIndices.kt @@ -2,6 +2,9 @@ fun testCollection(i: Int, xs: List) = i in xs.indices +fun testLongWithCollection(i: Long, xs: List) = i in xs.indices + // 0 INVOKESTATIC kotlin/collections/CollectionsKt.getIndices // 0 INVOKEVIRTUAL kotlin/ranges/IntRange.contains -// 1 INVOKEINTERFACE java/util/Collection.size +// 2 INVOKEINTERFACE java/util/Collection.size +// 2 I2L