Handle infix function calls in binary expressions.

This commit is contained in:
Dmitry Petrov
2016-08-18 19:23:17 +03:00
committed by Dmitry Petrov
parent 3614b0a06c
commit ace98b91cc
4 changed files with 47 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
fun test1(a: Boolean, b: Boolean) = a && b
fun test2(a: Boolean, b: Boolean) = a || b
fun test1x(a: Boolean, b: Boolean) = a and b
fun test2x(a: Boolean, b: Boolean) = a or b
+29
View File
@@ -0,0 +1,29 @@
IrFile /booleanOperators.kt
IrFunction public fun test1(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=ANDAND type=kotlin.Boolean related=null
GET_VAR a type=kotlin.Boolean operator=null
GET_VAR b type=kotlin.Boolean operator=null
IrFunction public fun test2(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=OROR type=kotlin.Boolean related=null
GET_VAR a type=kotlin.Boolean operator=null
GET_VAR b type=kotlin.Boolean operator=null
IrFunction public fun test1x(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .and type=kotlin.Boolean operator=null
$this: GET_VAR a type=kotlin.Boolean operator=null
other: GET_VAR b type=kotlin.Boolean operator=null
IrFunction public fun test2x(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .or type=kotlin.Boolean operator=null
$this: GET_VAR a type=kotlin.Boolean operator=null
other: GET_VAR b type=kotlin.Boolean operator=null