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
This commit is contained in:
committed by
Space Team
parent
bc5acb5e9d
commit
28759a3ac3
@@ -0,0 +1,16 @@
|
||||
// !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
|
||||
Reference in New Issue
Block a user