Files
kotlin/compiler/testData/codegen/bytecodeText/ranges/inOptimizableRange.kt
Alexander Udalov f5ff3d2fa9 Remove directives that have no effect from bytecode text tests
All bytecode text tests are run with stdlib in the classpath and only
for JVM backend, therefore directives WITH_RUNTIME, TARGET_BACKEND,
IGNORE_BACKEND are not needed
2018-12-20 12:53:24 +01:00

24 lines
660 B
Kotlin
Vendored

fun Byte.inByte(left: Byte, right: Byte) = this in left..right
fun Short.inInt(left: Int, right: Int) = this in left .. right
fun Short.inByte(left: Byte, right: Byte) = this in left..right
fun inInt(x: Int, left: Int, right: Int) = x in left..right
fun inDouble(x: Double, left: Double, right: Double) = x in left..right
fun inFloat(x: Float, left: Float, right: Float) = x in left..right
fun inLong(x: Long, left: Long, right: Long) = x in left..right
fun inCharWithNullableParameter(x: Char?, left: Char, right: Char) = x!! in left..right
// 0 INVOKESPECIAL
// 0 NEW
// 1 charValue
// 1 INVOKEVIRTUAL
// 0 CHECKCAST
// 0 INVOKEINTERFACE
// 0 <init>