KT-52791 Make it possible to pass multiple context receivers to a class

This commit is contained in:
Pavel Mikhailovskii
2022-12-28 11:21:03 +00:00
committed by Space Team
parent 62217b39ec
commit 906c161068
38 changed files with 180 additions and 516 deletions
@@ -32,14 +32,14 @@ FILE fqName:<root> fileName:/class.kt
CLASS CLASS name:Inner modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Inner
FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.Outer visibility:private [final]
CONSTRUCTOR visibility:public <> (<this>:<root>.Outer, arg:kotlin.Any) returnType:<root>.Inner [primary]
VALUE_PARAMETER name:<this> index:0 type:<root>.Outer
CONSTRUCTOR visibility:public <> (_context_receiver_0:<root>.Outer, arg:kotlin.Any) returnType:<root>.Inner [primary]
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Outer
VALUE_PARAMETER name:arg index:1 type:kotlin.Any
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
SET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.Outer visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Inner declared in <root>.Inner' type=<root>.Inner origin=null
value: GET_VAR '<this>: <root>.Outer declared in <root>.Inner.<init>' type=<root>.Outer origin=null
value: GET_VAR '_context_receiver_0: <root>.Outer declared in <root>.Inner.<init>' type=<root>.Outer origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN name:bar visibility:public modality:FINAL <> ($this:<root>.Inner) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.Inner
@@ -74,6 +74,6 @@ FILE fqName:<root> fileName:/class.kt
$receiver: VALUE_PARAMETER name:$this$with type:<root>.Outer
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): <root>.Inner declared in <root>.f'
CONSTRUCTOR_CALL 'public constructor <init> (<this>: <root>.Outer, arg: kotlin.Any) [primary] declared in <root>.Inner' type=<root>.Inner origin=null
<this>: GET_VAR '$this$with: <root>.Outer declared in <root>.f.<anonymous>' type=<root>.Outer origin=null
CONSTRUCTOR_CALL 'public constructor <init> (_context_receiver_0: <root>.Outer, arg: kotlin.Any) [primary] declared in <root>.Inner' type=<root>.Inner origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Outer declared in <root>.f.<anonymous>' type=<root>.Outer origin=null
arg: CONST Int type=kotlin.Int value=3