FIR: Fix operator and infix flags for FIR builtins
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
FILE fqName:test fileName:/test.kt
|
||||
FUN name:callBuiltinFunctions visibility:public modality:FINAL <> (a:kotlin.Int, b:kotlin.Int) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:a index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:b index:1 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
|
||||
$this: GET_VAR 'a: kotlin.Int declared in test.callBuiltinFunctions' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'b: kotlin.Int declared in test.callBuiltinFunctions' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun or (other: kotlin.Int): kotlin.Int [infix] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'a: kotlin.Int declared in test.callBuiltinFunctions' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'b: kotlin.Int declared in test.callBuiltinFunctions' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun and (other: kotlin.Int): kotlin.Int [infix] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'a: kotlin.Int declared in test.callBuiltinFunctions' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'b: kotlin.Int declared in test.callBuiltinFunctions' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun inv (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'a: kotlin.Int declared in test.callBuiltinFunctions' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun shl (bitCount: kotlin.Int): kotlin.Int [infix] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'a: kotlin.Int declared in test.callBuiltinFunctions' type=kotlin.Int origin=null
|
||||
bitCount: GET_VAR 'b: kotlin.Int declared in test.callBuiltinFunctions' type=kotlin.Int origin=null
|
||||
@@ -0,0 +1,12 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: test.kt
|
||||
|
||||
package test
|
||||
|
||||
fun callBuiltinFunctions(a: Int, b: Int) {
|
||||
a + b
|
||||
a or b
|
||||
a and b
|
||||
a.inv()
|
||||
a shl b
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
fun callBuiltinFunctions(a: Int, b: Int) {
|
||||
a.plus(other = b) /*~> Unit */
|
||||
a.or(other = b) /*~> Unit */
|
||||
a.and(other = b) /*~> Unit */
|
||||
a.inv() /*~> Unit */
|
||||
a.shl(bitCount = b) /*~> Unit */
|
||||
}
|
||||
Reference in New Issue
Block a user