Files
Alexander Udalov 28759a3ac3 Optimize rangeUntil operator in for-loops and contains
Newly added tests are basically copies of the existing tests on `until`.
Note that this operator is optimized for all backends, but the fact that
it's optimized is only checked for the JVM backend in bytecode text
tests.

 #KT-53330 Fixed
2023-01-02 12:55:48 +00:00

17 lines
379 B
Kotlin
Vendored

// !OPT_IN: kotlin.ExperimentalStdlibApi
// IGNORE_BACKEND: JVM
fun testChar(a: Char, x: Char, y: Char) = a in x..<y
fun testByte(a: Byte, x: Byte, y: Byte) = a in x..<y
fun testShort(a: Short, x: Short, y: Short) = a in x..<y
fun testInt(a: Int, x: Int, y: Int) = a in x..<y
fun testLong(a: Long, x: Long, y: Long) = a in x..<y
// 0 until
// 0 INVOKEVIRTUAL
// 0 contains