Files
kotlin/compiler/testData/codegen/bytecodeText/ranges/ifNotInRange.kt
Dmitry Petrov 4320b63922 Ensure that no boolean negation is generated for !in expression
#KT-18777 Fixed Target versions 1.1.4
2017-07-10 10:51:26 +03:00

17 lines
445 B
Kotlin
Vendored

fun testInt(x: Int, a: Int, b: Int) =
if (x !in a .. b) "no" else "yes"
fun testLong(x: Long, a: Long, b: Long) =
if (x !in a .. b) "no" else "yes"
fun testDouble(x: Double, a: Double, b: Double) =
if (x !in a .. b) "no" else "yes"
fun testString(x: String, a: String, b: String) =
if (x !in a .. b) "no" else "yes"
fun testCollection(x: Any, xs: List<Any>) =
if (x !in xs) "no" else "yes"
// 0 IXOR