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:
Dmitry Petrov
2017-06-29 18:09:38 +03:00
parent e3320c53f5
commit a7071ae7af
24 changed files with 744 additions and 29 deletions

View 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