Files
kotlin/compiler/testData/codegen/bytecodeText/ranges/ifNotInCollection.kt
Dmitry Petrov a7071ae7af Provide intrinsic generators for in/!in expression
TODO some tests should fail because range of comparables
(e.g., '"Alpha" .. "Omega"') is currently not implemented
2017-07-10 10:51:26 +03:00

17 lines
256 B
Kotlin
Vendored

// WITH_RUNTIME
// FILE: Ints.kt
val ints = listOf(1, 2, 3)
// FILE: Test.kt
fun test1(i: Int) =
if (i in ints) "Yes" else "No"
fun test2(i: Int) =
if (i !in ints) "Yes" else "No"
// @TestKt.class:
// 0 ICONST_0
// 0 ICONST_1
// 0 IXOR