[FIR2IR] Add extension receiver parameter to delegated members

This commit is contained in:
Mikhail Glukhikh
2020-08-27 18:26:09 +03:00
parent 22c63c4e80
commit 02b6f34067
8 changed files with 25 additions and 15 deletions
@@ -224,14 +224,16 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
CALL 'public abstract fun bar (): kotlin.Int declared in <root>.IBase' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase visibility:local [final]' type=<root>.IBase origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.bar' type=<root>.Test1 origin=null
FUN DELEGATED_MEMBER name:qux visibility:public modality:OPEN <> ($this:<root>.Test1) returnType:kotlin.Unit
FUN DELEGATED_MEMBER name:qux visibility:public modality:OPEN <> ($this:<root>.Test1, $receiver:kotlin.String) returnType:kotlin.Unit
overridden:
public abstract fun qux (): kotlin.Unit declared in <root>.IBase
$this: VALUE_PARAMETER DELEGATED_MEMBER name:<this> type:<root>.Test1
$receiver: VALUE_PARAMETER DELEGATED_MEMBER name:<this> type:kotlin.String
BLOCK_BODY
CALL 'public abstract fun qux (): kotlin.Unit declared in <root>.IBase' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase visibility:local [final]' type=<root>.IBase origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.qux' type=<root>.Test1 origin=null
$receiver: GET_VAR '<this>: kotlin.String declared in <root>.Test1.qux' type=kotlin.String origin=null
FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase visibility:local [final]
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -281,14 +283,16 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
CALL 'public abstract fun bar (): kotlin.Int declared in <root>.IBase' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase visibility:local [final]' type=<root>.IBase origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.bar' type=<root>.Test2 origin=null
FUN DELEGATED_MEMBER name:qux visibility:public modality:OPEN <> ($this:<root>.Test2) returnType:kotlin.Unit
FUN DELEGATED_MEMBER name:qux visibility:public modality:OPEN <> ($this:<root>.Test2, $receiver:kotlin.String) returnType:kotlin.Unit
overridden:
public abstract fun qux (): kotlin.Unit declared in <root>.IBase
$this: VALUE_PARAMETER DELEGATED_MEMBER name:<this> type:<root>.Test2
$receiver: VALUE_PARAMETER DELEGATED_MEMBER name:<this> type:kotlin.String
BLOCK_BODY
CALL 'public abstract fun qux (): kotlin.Unit declared in <root>.IBase' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase visibility:local [final]' type=<root>.IBase origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.qux' type=<root>.Test2 origin=null
$receiver: GET_VAR '<this>: kotlin.String declared in <root>.Test2.qux' type=kotlin.String origin=null
FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase visibility:local [final]
PROPERTY DELEGATED_MEMBER name:x visibility:public modality:OPEN [val]
FUN DELEGATED_MEMBER name:<get-x> visibility:public modality:OPEN <> ($this:<root>.Test2) returnType:kotlin.String
@@ -324,37 +328,43 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<set-y>' type=<root>.Test2 origin=null
<set-?>: GET_VAR '<set-?>: kotlin.Int declared in <root>.Test2.<set-y>' type=kotlin.Int origin=null
PROPERTY DELEGATED_MEMBER name:z1 visibility:public modality:OPEN [val]
FUN DELEGATED_MEMBER name:<get-z1> visibility:public modality:OPEN <> ($this:<root>.Test2) returnType:kotlin.Int
FUN DELEGATED_MEMBER name:<get-z1> visibility:public modality:OPEN <> ($this:<root>.Test2, $receiver:kotlin.Byte) returnType:kotlin.Int
correspondingProperty: PROPERTY DELEGATED_MEMBER name:z1 visibility:public modality:OPEN [val]
overridden:
public abstract fun <get-z1> (): kotlin.Int declared in <root>.IOther
$this: VALUE_PARAMETER DELEGATED_MEMBER name:<this> type:<root>.Test2
$receiver: VALUE_PARAMETER DELEGATED_MEMBER name:<this> type:kotlin.Byte
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-z1> (): kotlin.Int declared in <root>.Test2'
CALL 'public abstract fun <get-z1> (): kotlin.Int declared in <root>.IOther' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:<root>.IOther visibility:local [final]' type=<root>.IOther origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<get-z1>' type=<root>.Test2 origin=null
$receiver: GET_VAR '<this>: kotlin.Byte declared in <root>.Test2.<get-z1>' type=kotlin.Byte origin=null
PROPERTY DELEGATED_MEMBER name:z2 visibility:public modality:OPEN [var]
FUN DELEGATED_MEMBER name:<get-z2> visibility:public modality:OPEN <> ($this:<root>.Test2) returnType:kotlin.Int
FUN DELEGATED_MEMBER name:<get-z2> visibility:public modality:OPEN <> ($this:<root>.Test2, $receiver:kotlin.Byte) returnType:kotlin.Int
correspondingProperty: PROPERTY DELEGATED_MEMBER name:z2 visibility:public modality:OPEN [var]
overridden:
public abstract fun <get-z2> (): kotlin.Int declared in <root>.IOther
$this: VALUE_PARAMETER DELEGATED_MEMBER name:<this> type:<root>.Test2
$receiver: VALUE_PARAMETER DELEGATED_MEMBER name:<this> type:kotlin.Byte
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-z2> (): kotlin.Int declared in <root>.Test2'
CALL 'public abstract fun <get-z2> (): kotlin.Int declared in <root>.IOther' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:<root>.IOther visibility:local [final]' type=<root>.IOther origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<get-z2>' type=<root>.Test2 origin=null
FUN DELEGATED_MEMBER name:<set-z2> visibility:public modality:OPEN <> ($this:<root>.Test2, <set-?>:kotlin.Int) returnType:kotlin.Unit
$receiver: GET_VAR '<this>: kotlin.Byte declared in <root>.Test2.<get-z2>' type=kotlin.Byte origin=null
FUN DELEGATED_MEMBER name:<set-z2> visibility:public modality:OPEN <> ($this:<root>.Test2, $receiver:kotlin.Byte, <set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY DELEGATED_MEMBER name:z2 visibility:public modality:OPEN [var]
overridden:
public abstract fun <set-z2> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.IOther
$this: VALUE_PARAMETER DELEGATED_MEMBER name:<this> type:<root>.Test2
$receiver: VALUE_PARAMETER DELEGATED_MEMBER name:<this> type:kotlin.Byte
VALUE_PARAMETER DELEGATED_MEMBER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public abstract fun <set-z2> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.IOther' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:<root>.IOther visibility:local [final]' type=<root>.IOther origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<set-z2>' type=<root>.Test2 origin=null
$receiver: GET_VAR '<this>: kotlin.Byte declared in <root>.Test2.<set-z2>' type=kotlin.Byte origin=null
<set-?>: GET_VAR '<set-?>: kotlin.Int declared in <root>.Test2.<set-z2>' type=kotlin.Int origin=null
FIELD DELEGATE name:<$$delegate_1> type:<root>.IOther visibility:local [final]
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]