mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-07 08:31:28 +00:00
Provide intrinsic generators for in/!in expression
TODO some tests should fail because range of comparables (e.g., '"Alpha" .. "Omega"') is currently not implemented
This commit is contained in:
16
compiler/testData/codegen/bytecodeText/ranges/ifNotInCollection.kt
vendored
Normal file
16
compiler/testData/codegen/bytecodeText/ranges/ifNotInCollection.kt
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// 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
|
||||
Reference in New Issue
Block a user