'in' and '!in' operators.
This commit is contained in:
committed by
Dmitry Petrov
parent
96e3c52878
commit
0d94c3aeb4
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
fun test1(a: Any, x: Collection<Any>) = a in x
|
||||
fun test2(a: Any, x: Collection<Any>) = a !in x
|
||||
fun <T> test3(a: T, x: Collection<T>) = a in x
|
||||
fun <T> test4(a: T, x: Collection<T>) = a !in x
|
||||
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
IrFile /in.kt
|
||||
IrFunction public fun test1(/*0*/ a: kotlin.Any, /*1*/ x: kotlin.collections.Collection<kotlin.Any>): kotlin.Boolean
|
||||
IrExpressionBody
|
||||
BLOCK type=<no-type> hasResult=false isDesugared=true
|
||||
RETURN type=<no-type>
|
||||
CALL .contains type=kotlin.Boolean operator=IN
|
||||
$this: GET_VAR x type=kotlin.collections.Collection<kotlin.Any>
|
||||
element: GET_VAR a type=kotlin.Any
|
||||
IrFunction public fun test2(/*0*/ a: kotlin.Any, /*1*/ x: kotlin.collections.Collection<kotlin.Any>): kotlin.Boolean
|
||||
IrExpressionBody
|
||||
BLOCK type=<no-type> hasResult=false isDesugared=true
|
||||
RETURN type=<no-type>
|
||||
UNARY_OP operator=EXCL type=kotlin.Boolean related=null
|
||||
CALL .contains type=kotlin.Boolean operator=NOT_IN
|
||||
$this: GET_VAR x type=kotlin.collections.Collection<kotlin.Any>
|
||||
element: GET_VAR a type=kotlin.Any
|
||||
IrFunction public fun </*0*/ T> test3(/*0*/ a: T, /*1*/ x: kotlin.collections.Collection<T>): kotlin.Boolean
|
||||
IrExpressionBody
|
||||
BLOCK type=<no-type> hasResult=false isDesugared=true
|
||||
RETURN type=<no-type>
|
||||
CALL .contains type=kotlin.Boolean operator=IN
|
||||
$this: GET_VAR x type=kotlin.collections.Collection<T>
|
||||
element: GET_VAR a type=T
|
||||
IrFunction public fun </*0*/ T> test4(/*0*/ a: T, /*1*/ x: kotlin.collections.Collection<T>): kotlin.Boolean
|
||||
IrExpressionBody
|
||||
BLOCK type=<no-type> hasResult=false isDesugared=true
|
||||
RETURN type=<no-type>
|
||||
UNARY_OP operator=EXCL type=kotlin.Boolean related=null
|
||||
CALL .contains type=kotlin.Boolean operator=NOT_IN
|
||||
$this: GET_VAR x type=kotlin.collections.Collection<T>
|
||||
element: GET_VAR a type=T
|
||||
Reference in New Issue
Block a user