Add tests for intrinsified in/!in and mismatching range types

This commit is contained in:
Dmitry Petrov
2017-07-06 17:34:22 +03:00
parent 850e1b11fc
commit 6a3ff5ca46
3 changed files with 14 additions and 3 deletions

View File

@@ -4,6 +4,11 @@ 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 INVOKESTATIC kotlin/collections/ArraysKt.getIndices
// 0 INVOKEVIRTUAL kotlin/ranges/IntRange.contains
// 2 ARRAYLENGTH
// 4 I2L
// 4 ARRAYLENGTH