FIR2IR: add extension receiver parameters to functions

This commit is contained in:
Mikhail Glukhikh
2019-07-17 15:21:34 +03:00
parent be3fe9495c
commit 63b7fa70f9
63 changed files with 393 additions and 158 deletions
@@ -28,17 +28,20 @@ FILE fqName:test fileName:/safeCallWithIncrementDecrement.kt
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [var]
VALUE_PARAMETER name:value index:0 type:kotlin.Int
BLOCK_BODY
FUN name:inc visibility:public modality:FINAL <> () returnType:kotlin.Int?
FUN name:inc visibility:public modality:FINAL <> ($receiver:kotlin.Int?) returnType:kotlin.Int?
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int?
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun inc (): kotlin.Int? declared in test'
CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: ERROR_CALL 'Unresolved reference: this#' type=kotlin.Int?
FUN name:get visibility:public modality:FINAL <> (index:kotlin.Int) returnType:kotlin.Int
FUN name:get visibility:public modality:FINAL <> ($receiver:kotlin.Int?, index:kotlin.Int) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int?
VALUE_PARAMETER name:index index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun get (index: kotlin.Int): kotlin.Int declared in test'
CONST Int type=kotlin.Int value=42
FUN name:set visibility:public modality:FINAL <> (index:kotlin.Int, value:kotlin.Int) returnType:kotlin.Unit
FUN name:set visibility:public modality:FINAL <> ($receiver:kotlin.Int?, index:kotlin.Int, value:kotlin.Int) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int?
VALUE_PARAMETER name:index index:0 type:kotlin.Int
VALUE_PARAMETER name:value index:1 type:kotlin.Int
BLOCK_BODY
@@ -54,8 +57,10 @@ FILE fqName:test fileName:/safeCallWithIncrementDecrement.kt
BLOCK_BODY
VAR name:<unary> type:kotlin.Int [val]
CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in test' type=kotlin.Int origin=null
$receiver: CALL 'public final fun <get-p> (): kotlin.Int declared in test' type=kotlin.Int? origin=null
index: CONST Int type=kotlin.Int value=0
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in test' type=kotlin.Unit origin=null
$receiver: CALL 'public final fun <get-p> (): kotlin.Int declared in test' type=kotlin.Int? origin=null
index: CONST Int type=kotlin.Int value=0
value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val <unary>: kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null