Standardize context receiver parameter names

Previously, FIR used `_context_receiver_n` while FE10 used `<this>` for
all context receiver parameters. This commit changes the code in FE10
to follow the convention from FIR.
This commit is contained in:
Steven Schäfer
2022-10-04 15:19:30 +02:00
committed by Alexander Udalov
parent 5cf1a88c42
commit 21fef70367
80 changed files with 544 additions and 1728 deletions
@@ -1157,7 +1157,7 @@ class Fir2IrDeclarationStorage(
return contextReceiver.convertWithOffsets { startOffset, endOffset ->
irFactory.createValueParameter(
startOffset, endOffset, IrDeclarationOrigin.DEFINED, IrValueParameterSymbolImpl(),
Name.identifier("_context_receiver_$index"), index, type,
NameUtils.contextReceiverName(index), index, type,
null,
isCrossinline = false, isNoinline = false,
isHidden = false, isAssignable = false
@@ -44,11 +44,11 @@ import org.jetbrains.kotlin.lexer.KtTokens;
import org.jetbrains.kotlin.name.Name;
import org.jetbrains.kotlin.psi.*;
import org.jetbrains.kotlin.psi.psiUtil.PsiUtilsKt;
import org.jetbrains.kotlin.resolve.calls.util.CallResolverUtilKt;
import org.jetbrains.kotlin.resolve.calls.components.InferenceSession;
import org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowInfo;
import org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowInfoFactory;
import org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowValueFactory;
import org.jetbrains.kotlin.resolve.calls.util.CallResolverUtilKt;
import org.jetbrains.kotlin.resolve.calls.util.UnderscoreUtilKt;
import org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension;
import org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil;
@@ -68,6 +68,7 @@ import org.jetbrains.kotlin.types.typeUtil.TypeUtilsKt;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import static org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget.*;
import static org.jetbrains.kotlin.diagnostics.Errors.*;
@@ -975,18 +976,18 @@ public class DescriptorResolver {
}
List<KtContextReceiver> contextReceivers = variableDeclaration.getContextReceivers();
List<ReceiverParameterDescriptor> contextReceiverDescriptors = contextReceivers.stream()
.map(contextReceiver -> {
KtTypeReference typeReference = contextReceiver.typeReference();
if (typeReference == null) {
return null;
}
KotlinType type = typeResolver.resolveType(scopeForDeclarationResolutionWithTypeParameters, typeReference, trace, true);
AnnotationSplitter splitter = new AnnotationSplitter(storageManager, type.getAnnotations(), EnumSet.of(RECEIVER));
return DescriptorFactory.createContextReceiverParameterForCallable(
propertyDescriptor, type, contextReceiver.labelNameAsName(), splitter.getAnnotationsForTarget(RECEIVER)
);
}).collect(Collectors.toList());
List<ReceiverParameterDescriptor> contextReceiverDescriptors = IntStream.range(0, contextReceivers.size()).mapToObj(index -> {
KtContextReceiver contextReceiver = contextReceivers.get(index);
KtTypeReference typeReference = contextReceiver.typeReference();
if (typeReference == null) {
return null;
}
KotlinType type = typeResolver.resolveType(scopeForDeclarationResolutionWithTypeParameters, typeReference, trace, true);
AnnotationSplitter splitter = new AnnotationSplitter(storageManager, type.getAnnotations(), EnumSet.of(RECEIVER));
return DescriptorFactory.createContextReceiverParameterForCallable(
propertyDescriptor, type, contextReceiver.labelNameAsName(), splitter.getAnnotationsForTarget(RECEIVER), index
);
}).collect(Collectors.toList());
if (languageVersionSettings.supportsFeature(LanguageFeature.ContextReceivers)) {
Multimap<String, ReceiverParameterDescriptor> nameToReceiverMap = HashMultimap.create();
@@ -240,13 +240,14 @@ class FunctionDescriptorResolver(
functionDescriptor, it, splitter.getAnnotationsForTarget(AnnotationUseSiteTarget.RECEIVER)
)
}
val contextReceiverDescriptors = contextReceiverTypes.mapNotNull { contextReceiver ->
val contextReceiverDescriptors = contextReceiverTypes.mapIndexedNotNull { index, contextReceiver ->
val splitter = AnnotationSplitter(storageManager, contextReceiver.type.annotations, EnumSet.of(AnnotationUseSiteTarget.RECEIVER))
DescriptorFactory.createContextReceiverParameterForCallable(
functionDescriptor,
contextReceiver.type,
contextReceiver.label,
splitter.getAnnotationsForTarget(AnnotationUseSiteTarget.RECEIVER),
index
)
}
@@ -111,18 +111,18 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-operationScore>' type=kotlin.Int origin=null
FUN name:get visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, <this>:kotlin.Int, index:kotlin.Int) returnType:kotlin.Int [operator]
FUN name:get visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, _context_receiver_0:kotlin.Int, index:kotlin.Int) returnType:kotlin.Int [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.MyContainer
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:index index:1 type:kotlin.Int
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.get' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun get (<this>: kotlin.Int, index: kotlin.Int): kotlin.Int [operator] declared in <root>'
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.get' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun get (_context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.Int [operator] declared in <root>'
WHEN type=kotlin.Int origin=IF
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
@@ -133,17 +133,17 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Int type=kotlin.Int value=-1
FUN name:plusAssign visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, <this>:kotlin.Int, other:<root>.MyContainer) returnType:kotlin.Unit [operator]
FUN name:plusAssign visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, _context_receiver_0:kotlin.Int, other:<root>.MyContainer) returnType:kotlin.Unit [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.MyContainer
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.MyContainer
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.plusAssign' type=kotlin.Int origin=null
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.plusAssign' type=kotlin.Int origin=null
BLOCK type=kotlin.Unit origin=PLUSEQ
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.MyContainer [val]
GET_VAR '<this>: <root>.MyContainer declared in <root>.plusAssign' type=<root>.MyContainer origin=null
@@ -154,17 +154,17 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
$this: GET_VAR 'val tmp_1: <root>.MyContainer [val] declared in <root>.plusAssign' type=<root>.MyContainer origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'other: <root>.MyContainer declared in <root>.plusAssign' type=<root>.MyContainer origin=null
FUN name:inc visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, <this>:kotlin.Int) returnType:<root>.MyContainer [operator]
FUN name:inc visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, _context_receiver_0:kotlin.Int) returnType:<root>.MyContainer [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.MyContainer
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.inc' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun inc (<this>: kotlin.Int): <root>.MyContainer [operator] declared in <root>'
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.inc' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun inc (_context_receiver_0: kotlin.Int): <root>.MyContainer [operator] declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.MyContainer' type=<root>.MyContainer origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=GET_PROPERTY
@@ -183,20 +183,20 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
CALL 'public final fun plusAssign (<this>: kotlin.Int, other: <root>.MyContainer): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plusAssign (_context_receiver_0: kotlin.Int, other: <root>.MyContainer): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'var myContainer: <root>.MyContainer [var] declared in <root>.box' type=<root>.MyContainer origin=PLUSEQ
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.MyContainer' type=<root>.MyContainer origin=null
i: CALL 'public final fun get (<this>: kotlin.Int, index: kotlin.Int): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=GET_ARRAY_ELEMENT
i: CALL 'public final fun get (_context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=GET_ARRAY_ELEMENT
$receiver: BLOCK type=<root>.MyContainer origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:<root>.MyContainer [val]
GET_VAR 'var myContainer: <root>.MyContainer [var] declared in <root>.box' type=<root>.MyContainer origin=POSTFIX_INCR
SET_VAR 'var myContainer: <root>.MyContainer [var] declared in <root>.box' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc (<this>: kotlin.Int): <root>.MyContainer [operator] declared in <root>' type=<root>.MyContainer origin=POSTFIX_INCR
CALL 'public final fun inc (_context_receiver_0: kotlin.Int): <root>.MyContainer [operator] declared in <root>' type=<root>.MyContainer origin=POSTFIX_INCR
$receiver: GET_VAR 'val tmp_2: <root>.MyContainer [val] declared in <root>.box.<anonymous>' type=<root>.MyContainer origin=null
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
GET_VAR 'val tmp_2: <root>.MyContainer [val] declared in <root>.box.<anonymous>' type=<root>.MyContainer origin=null
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
index: CONST Int type=kotlin.Int value=0
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
WHEN type=kotlin.String origin=IF
@@ -47,9 +47,9 @@ var operationScore: Int
get
set
operator fun MyContainer.get(<this>: Int, index: Int): Int {
operator fun MyContainer.get(_context_receiver_0: Int, index: Int): Int {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return when {
EQEQ(arg0 = index, arg1 = 0) -> <this>.<get-i>()
@@ -57,9 +57,9 @@ operator fun MyContainer.get(<this>: Int, index: Int): Int {
}
}
operator fun MyContainer.plusAssign(<this>: Int, other: MyContainer) {
operator fun MyContainer.plusAssign(_context_receiver_0: Int, other: MyContainer) {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
{ // BLOCK
val tmp0_this: MyContainer = <this>
@@ -67,9 +67,9 @@ operator fun MyContainer.plusAssign(<this>: Int, other: MyContainer) {
}
}
operator fun MyContainer.inc(<this>: Int): MyContainer {
operator fun MyContainer.inc(_context_receiver_0: Int): MyContainer {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return MyContainer(i = <this>.<get-i>().plus(other = 1))
}
@@ -77,11 +77,11 @@ operator fun MyContainer.inc(<this>: Int): MyContainer {
fun box(): String {
var myContainer: MyContainer = MyContainer(i = 0)
with<Int, Unit>(receiver = 1, block = local fun Int.<anonymous>() {
myContainer.plusAssign(<this> = $this$with, other = MyContainer(i = { // BLOCK
myContainer.plusAssign(_context_receiver_0 = $this$with, other = MyContainer(i = { // BLOCK
val tmp0: MyContainer = myContainer
myContainer = tmp0.inc(<this> = $this$with)
myContainer = tmp0.inc(_context_receiver_0 = $this$with)
tmp0
}.get(<this> = $this$with, index = 0)))
}.get(_context_receiver_0 = $this$with, index = 0)))
}
)
return when {
@@ -96,13 +96,13 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.MyContainer'
CONST Boolean type=kotlin.Boolean value=true
FUN name:get visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, <this>:kotlin.Int, index:kotlin.Int) returnType:kotlin.String? [operator]
FUN name:get visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, _context_receiver_0:kotlin.Int, index:kotlin.Int) returnType:kotlin.String? [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.MyContainer
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:index index:1 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun get (<this>: kotlin.Int, index: kotlin.Int): kotlin.String? [operator] declared in <root>'
RETURN type=kotlin.Nothing from='public final fun get (_context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.String? [operator] declared in <root>'
WHEN type=kotlin.String? origin=IF
BRANCH
if: WHEN type=kotlin.Boolean origin=ANDAND
@@ -111,7 +111,7 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
arg0: GET_VAR 'index: kotlin.Int declared in <root>.get' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=0
then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR '<this>: kotlin.Int declared in <root>.get' type=kotlin.Int origin=null
arg0: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.get' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
@@ -121,10 +121,10 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Null type=kotlin.Nothing? value=null
FUN name:set visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, <this>:kotlin.Int, index:kotlin.Int, value:kotlin.String) returnType:kotlin.Unit [operator]
FUN name:set visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, _context_receiver_0:kotlin.Int, index:kotlin.Int, value:kotlin.String) returnType:kotlin.Unit [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.MyContainer
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:index index:1 type:kotlin.Int
VALUE_PARAMETER name:value index:2 type:kotlin.String
BLOCK_BODY
@@ -141,9 +141,9 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
arg0: GET_VAR '<this>: kotlin.Int declared in <root>.set' type=kotlin.Int origin=null
arg0: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.set' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=42
then: RETURN type=kotlin.Nothing from='public final fun set (<this>: kotlin.Int, index: kotlin.Int, value: kotlin.String): kotlin.Unit [operator] declared in <root>'
then: RETURN type=kotlin.Nothing from='public final fun set (_context_receiver_0: kotlin.Int, index: kotlin.Int, value: kotlin.String): kotlin.Unit [operator] declared in <root>'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
CALL 'public final fun <set-s> (<set-?>: kotlin.String): kotlin.Unit declared in <root>.MyContainer' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.MyContainer declared in <root>.set' type=<root>.MyContainer origin=null
@@ -162,17 +162,17 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
VAR name:myContainer type:<root>.MyContainer [val]
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) [primary] declared in <root>.MyContainer' type=<root>.MyContainer origin=null
s: CONST String type=kotlin.String value="fail"
CALL 'public final fun set (<this>: kotlin.Int, index: kotlin.Int, value: kotlin.String): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=EQ
CALL 'public final fun set (_context_receiver_0: kotlin.Int, index: kotlin.Int, value: kotlin.String): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=EQ
$receiver: GET_VAR 'val myContainer: <root>.MyContainer [val] declared in <root>.box.<anonymous>' type=<root>.MyContainer origin=null
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
index: CONST Int type=kotlin.Int value=0
value: CONST String type=kotlin.String value="OK"
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.box'
BLOCK type=kotlin.String origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.String? [val]
CALL 'public final fun get (<this>: kotlin.Int, index: kotlin.Int): kotlin.String? [operator] declared in <root>' type=kotlin.String? origin=GET_ARRAY_ELEMENT
CALL 'public final fun get (_context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.String? [operator] declared in <root>' type=kotlin.String? origin=GET_ARRAY_ELEMENT
$receiver: GET_VAR 'val myContainer: <root>.MyContainer [val] declared in <root>.box.<anonymous>' type=<root>.MyContainer origin=null
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
index: CONST Int type=kotlin.Int value=0
WHEN type=kotlin.String origin=null
BRANCH
@@ -42,21 +42,21 @@ data class MyContainer {
}
operator fun MyContainer.get(<this>: Int, index: Int): String? {
operator fun MyContainer.get(_context_receiver_0: Int, index: Int): String? {
return when {
when {
EQEQ(arg0 = index, arg1 = 0) -> EQEQ(arg0 = <this>, arg1 = 42)
EQEQ(arg0 = index, arg1 = 0) -> EQEQ(arg0 = _context_receiver_0, arg1 = 42)
else -> false
} -> <this>.<get-s>()
else -> null
}
}
operator fun MyContainer.set(<this>: Int, index: Int, value: String) {
operator fun MyContainer.set(_context_receiver_0: Int, index: Int, value: String) {
when {
when {
EQEQ(arg0 = index, arg1 = 0).not() -> true
else -> EQEQ(arg0 = <this>, arg1 = 42).not()
else -> EQEQ(arg0 = _context_receiver_0, arg1 = 42).not()
} -> return Unit
}
<this>.<set-s>(<set-?> = value)
@@ -65,9 +65,9 @@ operator fun MyContainer.set(<this>: Int, index: Int, value: String) {
fun box(): String {
return with<Int, String>(receiver = 42, block = local fun Int.<anonymous>(): String {
val myContainer: MyContainer = MyContainer(s = "fail")
myContainer.set(<this> = $this$with, index = 0, value = "OK")
myContainer.set(_context_receiver_0 = $this$with, index = 0, value = "OK")
return { // BLOCK
val tmp0_elvis_lhs: String? = myContainer.get(<this> = $this$with, index = 0)
val tmp0_elvis_lhs: String? = myContainer.get(_context_receiver_0 = $this$with, index = 0)
when {
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> "fail"
else -> tmp0_elvis_lhs
@@ -1,79 +0,0 @@
FILE fqName:<root> fileName:/class.kt
CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer
CONSTRUCTOR visibility:public <> () returnType:<root>.Outer [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=1
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Outer) returnType:kotlin.Int
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Outer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Int declared in <root>.Outer'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Outer declared in <root>.Outer.<get-x>' type=<root>.Outer origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
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
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
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
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun bar (): kotlin.Int declared in <root>.Inner'
CALL 'public final fun <get-x> (): kotlin.Int declared in <root>.Outer' type=kotlin.Int origin=GET_PROPERTY
$this: GET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.Outer visibility:private [final]' type=<root>.Outer origin=null
receiver: GET_VAR '<this>: <root>.Inner declared in <root>.Inner.bar' type=<root>.Inner origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:f visibility:public modality:FINAL <> (outer:<root>.Outer) returnType:kotlin.Unit
VALUE_PARAMETER name:outer index:0 type:<root>.Outer
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=<root>.Inner origin=null
<T>: <root>.Outer
<R>: <root>.Inner
receiver: GET_VAR 'outer: <root>.Outer declared in <root>.f' type=<root>.Outer origin=null
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<<root>.Outer, <root>.Inner> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.Outer) returnType:<root>.Inner
$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
arg: CONST Int type=kotlin.Int value=3
@@ -111,35 +111,35 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-operationScore>' type=kotlin.Int origin=null
FUN name:plus visibility:public modality:FINAL <> ($receiver:<root>.Result, <this>:kotlin.Int, other:<root>.Result) returnType:<root>.Result [operator]
FUN name:plus visibility:public modality:FINAL <> ($receiver:<root>.Result, _context_receiver_0:kotlin.Int, other:<root>.Result) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.plus' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun plus (<this>: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>'
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.plus' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun plus (_context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Result declared in <root>.plus' type=<root>.Result origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'other: <root>.Result declared in <root>.plus' type=<root>.Result origin=null
FUN name:plusAssign visibility:public modality:FINAL <> ($receiver:<root>.Result, <this>:kotlin.Int, other:<root>.Result) returnType:kotlin.Unit [operator]
FUN name:plusAssign visibility:public modality:FINAL <> ($receiver:<root>.Result, _context_receiver_0:kotlin.Int, other:<root>.Result) returnType:kotlin.Unit [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.plusAssign' type=kotlin.Int origin=null
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.plusAssign' type=kotlin.Int origin=null
BLOCK type=kotlin.Unit origin=PLUSEQ
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.Result [val]
GET_VAR '<this>: <root>.Result declared in <root>.plusAssign' type=<root>.Result origin=null
@@ -150,35 +150,35 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
$this: GET_VAR 'val tmp_1: <root>.Result [val] declared in <root>.plusAssign' type=<root>.Result origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'other: <root>.Result declared in <root>.plusAssign' type=<root>.Result origin=null
FUN name:minus visibility:public modality:FINAL <> ($receiver:<root>.Result, <this>:kotlin.Int, other:<root>.Result) returnType:<root>.Result [operator]
FUN name:minus visibility:public modality:FINAL <> ($receiver:<root>.Result, _context_receiver_0:kotlin.Int, other:<root>.Result) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.minus' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun minus (<this>: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>'
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.minus' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun minus (_context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=MINUS
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Result declared in <root>.minus' type=<root>.Result origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'other: <root>.Result declared in <root>.minus' type=<root>.Result origin=null
FUN name:minusAssign visibility:public modality:FINAL <> ($receiver:<root>.Result, <this>:kotlin.Int, other:<root>.Result) returnType:kotlin.Unit [operator]
FUN name:minusAssign visibility:public modality:FINAL <> ($receiver:<root>.Result, _context_receiver_0:kotlin.Int, other:<root>.Result) returnType:kotlin.Unit [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.minusAssign' type=kotlin.Int origin=null
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.minusAssign' type=kotlin.Int origin=null
BLOCK type=kotlin.Unit origin=MINUSEQ
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:<root>.Result [val]
GET_VAR '<this>: <root>.Result declared in <root>.minusAssign' type=<root>.Result origin=null
@@ -189,35 +189,35 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
$this: GET_VAR 'val tmp_2: <root>.Result [val] declared in <root>.minusAssign' type=<root>.Result origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'other: <root>.Result declared in <root>.minusAssign' type=<root>.Result origin=null
FUN name:times visibility:public modality:FINAL <> ($receiver:<root>.Result, <this>:kotlin.Int, other:<root>.Result) returnType:<root>.Result [operator]
FUN name:times visibility:public modality:FINAL <> ($receiver:<root>.Result, _context_receiver_0:kotlin.Int, other:<root>.Result) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.times' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun times (<this>: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>'
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.times' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun times (_context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun times (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=MUL
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Result declared in <root>.times' type=<root>.Result origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'other: <root>.Result declared in <root>.times' type=<root>.Result origin=null
FUN name:timesAssign visibility:public modality:FINAL <> ($receiver:<root>.Result, <this>:kotlin.Int, other:<root>.Result) returnType:kotlin.Unit [operator]
FUN name:timesAssign visibility:public modality:FINAL <> ($receiver:<root>.Result, _context_receiver_0:kotlin.Int, other:<root>.Result) returnType:kotlin.Unit [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.timesAssign' type=kotlin.Int origin=null
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.timesAssign' type=kotlin.Int origin=null
BLOCK type=kotlin.Unit origin=MULTEQ
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:<root>.Result [val]
GET_VAR '<this>: <root>.Result declared in <root>.timesAssign' type=<root>.Result origin=null
@@ -228,35 +228,35 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
$this: GET_VAR 'val tmp_3: <root>.Result [val] declared in <root>.timesAssign' type=<root>.Result origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'other: <root>.Result declared in <root>.timesAssign' type=<root>.Result origin=null
FUN name:div visibility:public modality:FINAL <> ($receiver:<root>.Result, <this>:kotlin.Int, other:<root>.Result) returnType:<root>.Result [operator]
FUN name:div visibility:public modality:FINAL <> ($receiver:<root>.Result, _context_receiver_0:kotlin.Int, other:<root>.Result) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.div' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun div (<this>: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>'
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.div' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun div (_context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun div (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=DIV
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Result declared in <root>.div' type=<root>.Result origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'other: <root>.Result declared in <root>.div' type=<root>.Result origin=null
FUN name:divAssign visibility:public modality:FINAL <> ($receiver:<root>.Result, <this>:kotlin.Int, other:<root>.Result) returnType:kotlin.Unit [operator]
FUN name:divAssign visibility:public modality:FINAL <> ($receiver:<root>.Result, _context_receiver_0:kotlin.Int, other:<root>.Result) returnType:kotlin.Unit [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.divAssign' type=kotlin.Int origin=null
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.divAssign' type=kotlin.Int origin=null
BLOCK type=kotlin.Unit origin=DIVEQ
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:<root>.Result [val]
GET_VAR '<this>: <root>.Result declared in <root>.divAssign' type=<root>.Result origin=null
@@ -280,40 +280,40 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
CALL 'public final fun plusAssign (<this>: kotlin.Int, other: <root>.Result): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plusAssign (_context_receiver_0: kotlin.Int, other: <root>.Result): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val result: <root>.Result [val] declared in <root>.box' type=<root>.Result origin=PLUSEQ
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CALL 'public final fun plus (<this>: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>' type=<root>.Result origin=PLUS
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CALL 'public final fun plus (_context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>' type=<root>.Result origin=PLUS
$receiver: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CONST Int type=kotlin.Int value=1
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CONST Int type=kotlin.Int value=1
CALL 'public final fun minusAssign (<this>: kotlin.Int, other: <root>.Result): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=MINUSEQ
CALL 'public final fun minusAssign (_context_receiver_0: kotlin.Int, other: <root>.Result): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=MINUSEQ
$receiver: GET_VAR 'val result: <root>.Result [val] declared in <root>.box' type=<root>.Result origin=MINUSEQ
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CALL 'public final fun minus (<this>: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>' type=<root>.Result origin=MINUS
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CALL 'public final fun minus (_context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>' type=<root>.Result origin=MINUS
$receiver: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CONST Int type=kotlin.Int value=1
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CONST Int type=kotlin.Int value=0
CALL 'public final fun timesAssign (<this>: kotlin.Int, other: <root>.Result): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=MULTEQ
CALL 'public final fun timesAssign (_context_receiver_0: kotlin.Int, other: <root>.Result): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=MULTEQ
$receiver: GET_VAR 'val result: <root>.Result [val] declared in <root>.box' type=<root>.Result origin=MULTEQ
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CALL 'public final fun times (<this>: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>' type=<root>.Result origin=MUL
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CALL 'public final fun times (_context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>' type=<root>.Result origin=MUL
$receiver: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CONST Int type=kotlin.Int value=1
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CONST Int type=kotlin.Int value=2
CALL 'public final fun divAssign (<this>: kotlin.Int, other: <root>.Result): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=DIVEQ
CALL 'public final fun divAssign (_context_receiver_0: kotlin.Int, other: <root>.Result): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=DIVEQ
$receiver: GET_VAR 'val result: <root>.Result [val] declared in <root>.box' type=<root>.Result origin=DIVEQ
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CALL 'public final fun div (<this>: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>' type=<root>.Result origin=DIV
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CALL 'public final fun div (_context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result [operator] declared in <root>' type=<root>.Result origin=DIV
$receiver: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CONST Int type=kotlin.Int value=4
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CONST Int type=kotlin.Int value=2
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
@@ -47,16 +47,16 @@ var operationScore: Int
get
set
operator fun Result.plus(<this>: Int, other: Result): Result {
operator fun Result.plus(_context_receiver_0: Int, other: Result): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return Result(i = <this>.<get-i>().plus(other = other.<get-i>()))
}
operator fun Result.plusAssign(<this>: Int, other: Result) {
operator fun Result.plusAssign(_context_receiver_0: Int, other: Result) {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
{ // BLOCK
val tmp0_this: Result = <this>
@@ -64,16 +64,16 @@ operator fun Result.plusAssign(<this>: Int, other: Result) {
}
}
operator fun Result.minus(<this>: Int, other: Result): Result {
operator fun Result.minus(_context_receiver_0: Int, other: Result): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return Result(i = <this>.<get-i>().minus(other = other.<get-i>()))
}
operator fun Result.minusAssign(<this>: Int, other: Result) {
operator fun Result.minusAssign(_context_receiver_0: Int, other: Result) {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
{ // BLOCK
val tmp0_this: Result = <this>
@@ -81,16 +81,16 @@ operator fun Result.minusAssign(<this>: Int, other: Result) {
}
}
operator fun Result.times(<this>: Int, other: Result): Result {
operator fun Result.times(_context_receiver_0: Int, other: Result): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return Result(i = <this>.<get-i>().times(other = other.<get-i>()))
}
operator fun Result.timesAssign(<this>: Int, other: Result) {
operator fun Result.timesAssign(_context_receiver_0: Int, other: Result) {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
{ // BLOCK
val tmp0_this: Result = <this>
@@ -98,16 +98,16 @@ operator fun Result.timesAssign(<this>: Int, other: Result) {
}
}
operator fun Result.div(<this>: Int, other: Result): Result {
operator fun Result.div(_context_receiver_0: Int, other: Result): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return Result(i = <this>.<get-i>().div(other = other.<get-i>()))
}
operator fun Result.divAssign(<this>: Int, other: Result) {
operator fun Result.divAssign(_context_receiver_0: Int, other: Result) {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
{ // BLOCK
val tmp0_this: Result = <this>
@@ -118,10 +118,10 @@ operator fun Result.divAssign(<this>: Int, other: Result) {
fun box(): String {
val result: Result = Result(i = 0)
with<Int, Unit>(receiver = 1, block = local fun Int.<anonymous>() {
result.plusAssign(<this> = $this$with, other = Result(i = 1).plus(<this> = $this$with, other = Result(i = 1)))
result.minusAssign(<this> = $this$with, other = Result(i = 1).minus(<this> = $this$with, other = Result(i = 0)))
result.timesAssign(<this> = $this$with, other = Result(i = 1).times(<this> = $this$with, other = Result(i = 2)))
result.divAssign(<this> = $this$with, other = Result(i = 4).div(<this> = $this$with, other = Result(i = 2)))
result.plusAssign(_context_receiver_0 = $this$with, other = Result(i = 1).plus(_context_receiver_0 = $this$with, other = Result(i = 1)))
result.minusAssign(_context_receiver_0 = $this$with, other = Result(i = 1).minus(_context_receiver_0 = $this$with, other = Result(i = 0)))
result.timesAssign(_context_receiver_0 = $this$with, other = Result(i = 1).times(_context_receiver_0 = $this$with, other = Result(i = 2)))
result.divAssign(_context_receiver_0 = $this$with, other = Result(i = 4).div(_context_receiver_0 = $this$with, other = Result(i = 2)))
}
)
return when {
@@ -23,44 +23,44 @@ FILE fqName:<root> fileName:/contextualInlineCall.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:testInline visibility:public modality:FINAL <> (<this>:<root>.Context) returnType:kotlin.Int [inline]
FUN name:testInline visibility:public modality:FINAL <> (_context_receiver_0:<root>.Context) returnType:kotlin.Int [inline]
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.Context
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInline (<this>: <root>.Context): kotlin.Int [inline] declared in <root>'
RETURN type=kotlin.Nothing from='public final fun testInline (_context_receiver_0: <root>.Context): kotlin.Int [inline] declared in <root>'
CALL 'public final fun c (): kotlin.Int declared in <root>.Context' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.Context declared in <root>.testInline' type=<root>.Context origin=null
FUN name:testInlineWithArg visibility:public modality:FINAL <> (<this>:<root>.Context, i:kotlin.Int) returnType:kotlin.Int [inline]
$this: GET_VAR '_context_receiver_0: <root>.Context declared in <root>.testInline' type=<root>.Context origin=null
FUN name:testInlineWithArg visibility:public modality:FINAL <> (_context_receiver_0:<root>.Context, i:kotlin.Int) returnType:kotlin.Int [inline]
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.Context
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Context
VALUE_PARAMETER name:i index:1 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInlineWithArg (<this>: <root>.Context, i: kotlin.Int): kotlin.Int [inline] declared in <root>'
RETURN type=kotlin.Nothing from='public final fun testInlineWithArg (_context_receiver_0: <root>.Context, i: kotlin.Int): kotlin.Int [inline] declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR 'i: kotlin.Int declared in <root>.testInlineWithArg' type=kotlin.Int origin=null
other: CALL 'public final fun c (): kotlin.Int declared in <root>.Context' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.Context declared in <root>.testInlineWithArg' type=<root>.Context origin=null
FUN name:testInlineWithExtensionAndArg visibility:public modality:FINAL <> ($receiver:kotlin.Int, <this>:<root>.Context, i:kotlin.Int) returnType:kotlin.Int [inline]
$this: GET_VAR '_context_receiver_0: <root>.Context declared in <root>.testInlineWithArg' type=<root>.Context origin=null
FUN name:testInlineWithExtensionAndArg visibility:public modality:FINAL <> ($receiver:kotlin.Int, _context_receiver_0:<root>.Context, i:kotlin.Int) returnType:kotlin.Int [inline]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
VALUE_PARAMETER name:<this> index:0 type:<root>.Context
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Context
VALUE_PARAMETER name:i index:1 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInlineWithExtensionAndArg (<this>: <root>.Context, i: kotlin.Int): kotlin.Int [inline] declared in <root>'
RETURN type=kotlin.Nothing from='public final fun testInlineWithExtensionAndArg (_context_receiver_0: <root>.Context, i: kotlin.Int): kotlin.Int [inline] declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.testInlineWithExtensionAndArg' type=kotlin.Int origin=null
other: GET_VAR 'i: kotlin.Int declared in <root>.testInlineWithExtensionAndArg' type=kotlin.Int origin=null
other: CALL 'public final fun c (): kotlin.Int declared in <root>.Context' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.Context declared in <root>.testInlineWithExtensionAndArg' type=<root>.Context origin=null
FUN name:testInlineWithExtensionAndMultipleArgs visibility:public modality:FINAL <> ($receiver:kotlin.Int, <this>:<root>.Context, i1:kotlin.Int, i2:kotlin.Int) returnType:kotlin.Int [inline]
$this: GET_VAR '_context_receiver_0: <root>.Context declared in <root>.testInlineWithExtensionAndArg' type=<root>.Context origin=null
FUN name:testInlineWithExtensionAndMultipleArgs visibility:public modality:FINAL <> ($receiver:kotlin.Int, _context_receiver_0:<root>.Context, i1:kotlin.Int, i2:kotlin.Int) returnType:kotlin.Int [inline]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
VALUE_PARAMETER name:<this> index:0 type:<root>.Context
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Context
VALUE_PARAMETER name:i1 index:1 type:kotlin.Int
VALUE_PARAMETER name:i2 index:2 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInlineWithExtensionAndMultipleArgs (<this>: <root>.Context, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int [inline] declared in <root>'
RETURN type=kotlin.Nothing from='public final fun testInlineWithExtensionAndMultipleArgs (_context_receiver_0: <root>.Context, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int [inline] declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
@@ -68,7 +68,7 @@ FILE fqName:<root> fileName:/contextualInlineCall.kt
other: GET_VAR 'i1: kotlin.Int declared in <root>.testInlineWithExtensionAndMultipleArgs' type=kotlin.Int origin=null
other: GET_VAR 'i2: kotlin.Int declared in <root>.testInlineWithExtensionAndMultipleArgs' type=kotlin.Int origin=null
other: CALL 'public final fun c (): kotlin.Int declared in <root>.Context' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.Context declared in <root>.testInlineWithExtensionAndMultipleArgs' type=<root>.Context origin=null
$this: GET_VAR '_context_receiver_0: <root>.Context declared in <root>.testInlineWithExtensionAndMultipleArgs' type=<root>.Context origin=null
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
CONSTRUCTOR visibility:public <> (a:kotlin.Any?) returnType:<root>.A [primary]
@@ -100,11 +100,11 @@ FILE fqName:<root> fileName:/contextualInlineCall.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:testInlineWithExtensionAndMultipleContextsAndArgs visibility:public modality:FINAL <> ($receiver:kotlin.Int, <this>:<root>.Context, <this>:<root>.A, i1:kotlin.Int, i2:kotlin.Int) returnType:kotlin.Int [inline]
FUN name:testInlineWithExtensionAndMultipleContextsAndArgs visibility:public modality:FINAL <> ($receiver:kotlin.Int, _context_receiver_0:<root>.Context, _context_receiver_1:<root>.A, i1:kotlin.Int, i2:kotlin.Int) returnType:kotlin.Int [inline]
contextReceiverParametersCount: 2
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
VALUE_PARAMETER name:<this> index:0 type:<root>.Context
VALUE_PARAMETER name:<this> index:1 type:<root>.A
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Context
VALUE_PARAMETER name:_context_receiver_1 index:1 type:<root>.A
VALUE_PARAMETER name:i1 index:2 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=1
@@ -112,7 +112,7 @@ FILE fqName:<root> fileName:/contextualInlineCall.kt
EXPRESSION_BODY
CONST Int type=kotlin.Int value=2
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInlineWithExtensionAndMultipleContextsAndArgs (<this>: <root>.Context, <this>: <root>.A, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int [inline] declared in <root>'
RETURN type=kotlin.Nothing from='public final fun testInlineWithExtensionAndMultipleContextsAndArgs (_context_receiver_0: <root>.Context, _context_receiver_1: <root>.A, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int [inline] declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
@@ -121,12 +121,12 @@ FILE fqName:<root> fileName:/contextualInlineCall.kt
other: GET_VAR 'i1: kotlin.Int declared in <root>.testInlineWithExtensionAndMultipleContextsAndArgs' type=kotlin.Int origin=null
other: GET_VAR 'i2: kotlin.Int declared in <root>.testInlineWithExtensionAndMultipleContextsAndArgs' type=kotlin.Int origin=null
other: CALL 'public final fun c (): kotlin.Int declared in <root>.Context' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.Context declared in <root>.testInlineWithExtensionAndMultipleContextsAndArgs' type=<root>.Context origin=null
$this: GET_VAR '_context_receiver_0: <root>.Context declared in <root>.testInlineWithExtensionAndMultipleContextsAndArgs' type=<root>.Context origin=null
other: WHEN type=kotlin.Int origin=IF
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: CALL 'public final fun <get-a> (): kotlin.Any? declared in <root>.A' type=kotlin.Any? origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.A declared in <root>.testInlineWithExtensionAndMultipleContextsAndArgs' type=<root>.A origin=null
$this: GET_VAR '_context_receiver_1: <root>.A declared in <root>.testInlineWithExtensionAndMultipleContextsAndArgs' type=<root>.A origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=0
BRANCH
@@ -148,27 +148,27 @@ FILE fqName:<root> fileName:/contextualInlineCall.kt
SET_VAR 'var result: kotlin.Int [var] declared in <root>.box.<anonymous>' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'var result: kotlin.Int [var] declared in <root>.box.<anonymous>' type=kotlin.Int origin=PLUSEQ
other: CALL 'public final fun testInline (<this>: <root>.Context): kotlin.Int [inline] declared in <root>' type=kotlin.Int origin=null
<this>: GET_VAR '$this$with: <root>.Context declared in <root>.box.<anonymous>' type=<root>.Context origin=null
other: CALL 'public final fun testInline (_context_receiver_0: <root>.Context): kotlin.Int [inline] declared in <root>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Context declared in <root>.box.<anonymous>' type=<root>.Context origin=null
SET_VAR 'var result: kotlin.Int [var] declared in <root>.box.<anonymous>' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'var result: kotlin.Int [var] declared in <root>.box.<anonymous>' type=kotlin.Int origin=PLUSEQ
other: CALL 'public final fun testInlineWithArg (<this>: <root>.Context, i: kotlin.Int): kotlin.Int [inline] declared in <root>' type=kotlin.Int origin=null
<this>: GET_VAR '$this$with: <root>.Context declared in <root>.box.<anonymous>' type=<root>.Context origin=null
other: CALL 'public final fun testInlineWithArg (_context_receiver_0: <root>.Context, i: kotlin.Int): kotlin.Int [inline] declared in <root>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Context declared in <root>.box.<anonymous>' type=<root>.Context origin=null
i: CONST Int type=kotlin.Int value=1
SET_VAR 'var result: kotlin.Int [var] declared in <root>.box.<anonymous>' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'var result: kotlin.Int [var] declared in <root>.box.<anonymous>' type=kotlin.Int origin=PLUSEQ
other: CALL 'public final fun testInlineWithExtensionAndArg (<this>: <root>.Context, i: kotlin.Int): kotlin.Int [inline] declared in <root>' type=kotlin.Int origin=null
other: CALL 'public final fun testInlineWithExtensionAndArg (_context_receiver_0: <root>.Context, i: kotlin.Int): kotlin.Int [inline] declared in <root>' type=kotlin.Int origin=null
$receiver: CONST Int type=kotlin.Int value=1
<this>: GET_VAR '$this$with: <root>.Context declared in <root>.box.<anonymous>' type=<root>.Context origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Context declared in <root>.box.<anonymous>' type=<root>.Context origin=null
i: CONST Int type=kotlin.Int value=1
SET_VAR 'var result: kotlin.Int [var] declared in <root>.box.<anonymous>' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'var result: kotlin.Int [var] declared in <root>.box.<anonymous>' type=kotlin.Int origin=PLUSEQ
other: CALL 'public final fun testInlineWithExtensionAndMultipleArgs (<this>: <root>.Context, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int [inline] declared in <root>' type=kotlin.Int origin=null
other: CALL 'public final fun testInlineWithExtensionAndMultipleArgs (_context_receiver_0: <root>.Context, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int [inline] declared in <root>' type=kotlin.Int origin=null
$receiver: CONST Int type=kotlin.Int value=1
<this>: GET_VAR '$this$with: <root>.Context declared in <root>.box.<anonymous>' type=<root>.Context origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Context declared in <root>.box.<anonymous>' type=<root>.Context origin=null
i1: CONST Int type=kotlin.Int value=1
i2: CONST Int type=kotlin.Int value=2
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Unit origin=null
@@ -183,19 +183,19 @@ FILE fqName:<root> fileName:/contextualInlineCall.kt
SET_VAR 'var result: kotlin.Int [var] declared in <root>.box.<anonymous>' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'var result: kotlin.Int [var] declared in <root>.box.<anonymous>' type=kotlin.Int origin=PLUSEQ
other: CALL 'public final fun testInlineWithExtensionAndMultipleContextsAndArgs (<this>: <root>.Context, <this>: <root>.A, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int [inline] declared in <root>' type=kotlin.Int origin=null
other: CALL 'public final fun testInlineWithExtensionAndMultipleContextsAndArgs (_context_receiver_0: <root>.Context, _context_receiver_1: <root>.A, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int [inline] declared in <root>' type=kotlin.Int origin=null
$receiver: CONST Int type=kotlin.Int value=1
<this>: GET_VAR '$this$with: <root>.Context declared in <root>.box.<anonymous>' type=<root>.Context origin=null
<this>: GET_VAR '$this$with: <root>.A declared in <root>.box.<anonymous>.<anonymous>' type=<root>.A origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Context declared in <root>.box.<anonymous>' type=<root>.Context origin=null
_context_receiver_1: GET_VAR '$this$with: <root>.A declared in <root>.box.<anonymous>.<anonymous>' type=<root>.A origin=null
i1: CONST Int type=kotlin.Int value=1
i2: CONST Int type=kotlin.Int value=2
SET_VAR 'var result: kotlin.Int [var] declared in <root>.box.<anonymous>' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'var result: kotlin.Int [var] declared in <root>.box.<anonymous>' type=kotlin.Int origin=PLUSEQ
other: CALL 'public final fun testInlineWithExtensionAndMultipleContextsAndArgs (<this>: <root>.Context, <this>: <root>.A, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int [inline] declared in <root>' type=kotlin.Int origin=null
other: CALL 'public final fun testInlineWithExtensionAndMultipleContextsAndArgs (_context_receiver_0: <root>.Context, _context_receiver_1: <root>.A, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int [inline] declared in <root>' type=kotlin.Int origin=null
$receiver: CONST Int type=kotlin.Int value=1
<this>: GET_VAR '$this$with: <root>.Context declared in <root>.box.<anonymous>' type=<root>.Context origin=null
<this>: GET_VAR '$this$with: <root>.A declared in <root>.box.<anonymous>.<anonymous>' type=<root>.A origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Context declared in <root>.box.<anonymous>' type=<root>.Context origin=null
_context_receiver_1: GET_VAR '$this$with: <root>.A declared in <root>.box.<anonymous>.<anonymous>' type=<root>.A origin=null
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
WHEN type=kotlin.String origin=IF
BRANCH
@@ -11,20 +11,20 @@ class Context {
}
inline fun testInline(<this>: Context): Int {
return <this>.c()
inline fun testInline(_context_receiver_0: Context): Int {
return _context_receiver_0.c()
}
inline fun testInlineWithArg(<this>: Context, i: Int): Int {
return i.plus(other = <this>.c())
inline fun testInlineWithArg(_context_receiver_0: Context, i: Int): Int {
return i.plus(other = _context_receiver_0.c())
}
inline fun Int.testInlineWithExtensionAndArg(<this>: Context, i: Int): Int {
return <this>.plus(other = i).plus(other = <this>.c())
inline fun Int.testInlineWithExtensionAndArg(_context_receiver_0: Context, i: Int): Int {
return <this>.plus(other = i).plus(other = _context_receiver_0.c())
}
inline fun Int.testInlineWithExtensionAndMultipleArgs(<this>: Context, i1: Int, i2: Int): Int {
return <this>.plus(other = i1).plus(other = i2).plus(other = <this>.c())
inline fun Int.testInlineWithExtensionAndMultipleArgs(_context_receiver_0: Context, i1: Int, i2: Int): Int {
return <this>.plus(other = i1).plus(other = i2).plus(other = _context_receiver_0.c())
}
class A {
@@ -40,9 +40,9 @@ class A {
}
inline fun Int.testInlineWithExtensionAndMultipleContextsAndArgs(<this>: Context, <this>: A, i1: Int = 1, i2: Int = 2): Int {
return <this>.plus(other = i1).plus(other = i2).plus(other = <this>.c()).plus(other = when {
EQEQ(arg0 = <this>.<get-a>(), arg1 = null) -> 0
inline fun Int.testInlineWithExtensionAndMultipleContextsAndArgs(_context_receiver_0: Context, _context_receiver_1: A, i1: Int = 1, i2: Int = 2): Int {
return <this>.plus(other = i1).plus(other = i2).plus(other = _context_receiver_0.c()).plus(other = when {
EQEQ(arg0 = _context_receiver_1.<get-a>(), arg1 = null) -> 0
else -> 1
})
}
@@ -50,13 +50,13 @@ inline fun Int.testInlineWithExtensionAndMultipleContextsAndArgs(<this>: Context
fun box(): String {
return with<Context, Nothing>(receiver = Context(), block = local fun Context.<anonymous>(): Nothing {
var result: Int = 0
result = result.plus(other = testInline(<this> = $this$with))
result = result.plus(other = testInlineWithArg(<this> = $this$with, i = 1))
result = result.plus(other = 1.testInlineWithExtensionAndArg(<this> = $this$with, i = 1))
result = result.plus(other = 1.testInlineWithExtensionAndMultipleArgs(<this> = $this$with, i1 = 1, i2 = 2))
result = result.plus(other = testInline(_context_receiver_0 = $this$with))
result = result.plus(other = testInlineWithArg(_context_receiver_0 = $this$with, i = 1))
result = result.plus(other = 1.testInlineWithExtensionAndArg(_context_receiver_0 = $this$with, i = 1))
result = result.plus(other = 1.testInlineWithExtensionAndMultipleArgs(_context_receiver_0 = $this$with, i1 = 1, i2 = 2))
with<A, Unit>(receiver = A(a = 1), block = local fun A.<anonymous>() {
result = result.plus(other = 1.testInlineWithExtensionAndMultipleContextsAndArgs(<this> = $this$with, <this> = $this$with, i1 = 1, i2 = 2))
result = result.plus(other = 1.testInlineWithExtensionAndMultipleContextsAndArgs(<this> = $this$with, <this> = $this$with))
result = result.plus(other = 1.testInlineWithExtensionAndMultipleContextsAndArgs(_context_receiver_0 = $this$with, _context_receiver_1 = $this$with, i1 = 1, i2 = 2))
result = result.plus(other = 1.testInlineWithExtensionAndMultipleContextsAndArgs(_context_receiver_0 = $this$with, _context_receiver_1 = $this$with))
}
)
return when {
@@ -39,10 +39,10 @@ FILE fqName:<root> fileName:/delegatedPropertiesOperators.kt
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegateValue type:kotlin.String visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Delegate declared in <root>.Delegate.<set-delegateValue>' type=<root>.Delegate origin=null
value: GET_VAR '<set-?>: kotlin.String declared in <root>.Delegate.<set-delegateValue>' type=kotlin.String origin=null
FUN name:getValue visibility:public modality:FINAL <> ($this:<root>.Delegate, <this>:kotlin.Int, thisRef:kotlin.Any?, property:kotlin.reflect.KProperty<*>) returnType:kotlin.String [operator]
FUN name:getValue visibility:public modality:FINAL <> ($this:<root>.Delegate, _context_receiver_0:kotlin.Int, thisRef:kotlin.Any?, property:kotlin.reflect.KProperty<*>) returnType:kotlin.String [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Delegate
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:thisRef index:1 type:kotlin.Any?
VALUE_PARAMETER name:property index:2 type:kotlin.reflect.KProperty<*>
BLOCK_BODY
@@ -50,14 +50,14 @@ FILE fqName:<root> fileName:/delegatedPropertiesOperators.kt
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.Delegate.getValue' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun getValue (<this>: kotlin.Int, thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): kotlin.String [operator] declared in <root>.Delegate'
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.Delegate.getValue' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun getValue (_context_receiver_0: kotlin.Int, thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): kotlin.String [operator] declared in <root>.Delegate'
CALL 'public final fun <get-delegateValue> (): kotlin.String declared in <root>.Delegate' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Delegate declared in <root>.Delegate.getValue' type=<root>.Delegate origin=null
FUN name:setValue visibility:public modality:FINAL <> ($this:<root>.Delegate, <this>:kotlin.Int, thisRef:kotlin.Any?, property:kotlin.reflect.KProperty<*>, value:kotlin.String) returnType:kotlin.Unit [operator]
FUN name:setValue visibility:public modality:FINAL <> ($this:<root>.Delegate, _context_receiver_0:kotlin.Int, thisRef:kotlin.Any?, property:kotlin.reflect.KProperty<*>, value:kotlin.String) returnType:kotlin.Unit [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Delegate
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:thisRef index:1 type:kotlin.Any?
VALUE_PARAMETER name:property index:2 type:kotlin.reflect.KProperty<*>
VALUE_PARAMETER name:value index:3 type:kotlin.String
@@ -66,7 +66,7 @@ FILE fqName:<root> fileName:/delegatedPropertiesOperators.kt
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.Delegate.setValue' type=kotlin.Int origin=null
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.Delegate.setValue' type=kotlin.Int origin=null
CALL 'public final fun <set-delegateValue> (<set-?>: kotlin.String): kotlin.Unit declared in <root>.Delegate' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Delegate declared in <root>.Delegate.setValue' type=<root>.Delegate origin=null
<set-?>: GET_VAR 'value: kotlin.String declared in <root>.Delegate.setValue' type=kotlin.String origin=null
@@ -103,10 +103,10 @@ FILE fqName:<root> fileName:/delegatedPropertiesOperators.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-s> (): kotlin.String declared in <root>.Result'
CALL 'public final fun getValue (<this>: kotlin.Int, thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): kotlin.String [operator] declared in <root>.Delegate' type=kotlin.String origin=null
CALL 'public final fun getValue (_context_receiver_0: kotlin.Int, thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): kotlin.String [operator] declared in <root>.Delegate' type=kotlin.String origin=null
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:s$delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.<get-s>' type=<root>.Result origin=null
<this>: GET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
_context_receiver_0: GET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.<get-s>' type=<root>.Result origin=null
thisRef: GET_VAR '<this>: <root>.Result declared in <root>.Result.<get-s>' type=<root>.Result origin=null
property: PROPERTY_REFERENCE 'public final s: kotlin.String [delegated,var]' field=null getter='public final fun <get-s> (): kotlin.String declared in <root>.Result' setter='public final fun <set-s> (<set-?>: kotlin.String): kotlin.Unit declared in <root>.Result' type=kotlin.reflect.KMutableProperty1<<root>.Result, kotlin.String> origin=PROPERTY_REFERENCE_FOR_DELEGATE
@@ -116,10 +116,10 @@ FILE fqName:<root> fileName:/delegatedPropertiesOperators.kt
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <set-s> (<set-?>: kotlin.String): kotlin.Unit declared in <root>.Result'
CALL 'public final fun setValue (<this>: kotlin.Int, thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: kotlin.String): kotlin.Unit [operator] declared in <root>.Delegate' type=kotlin.Unit origin=null
CALL 'public final fun setValue (_context_receiver_0: kotlin.Int, thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: kotlin.String): kotlin.Unit [operator] declared in <root>.Delegate' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:s$delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.<set-s>' type=<root>.Result origin=null
<this>: GET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
_context_receiver_0: GET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.<set-s>' type=<root>.Result origin=null
thisRef: GET_VAR '<this>: <root>.Result declared in <root>.Result.<set-s>' type=<root>.Result origin=null
property: PROPERTY_REFERENCE 'public final s: kotlin.String [delegated,var]' field=null getter='public final fun <get-s> (): kotlin.String declared in <root>.Result' setter='public final fun <set-s> (<set-?>: kotlin.String): kotlin.Unit declared in <root>.Result' type=kotlin.reflect.KMutableProperty1<<root>.Result, kotlin.String> origin=PROPERTY_REFERENCE_FOR_DELEGATE
@@ -15,16 +15,16 @@ class Delegate {
get
set
operator fun getValue(<this>: Int, thisRef: Any?, property: KProperty<*>): String {
operator fun getValue(_context_receiver_0: Int, thisRef: Any?, property: KProperty<*>): String {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return <this>.<get-delegateValue>()
}
operator fun setValue(<this>: Int, thisRef: Any?, property: KProperty<*>, value: String) {
operator fun setValue(_context_receiver_0: Int, thisRef: Any?, property: KProperty<*>, value: String) {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
<this>.<set-delegateValue>(<set-?> = value)
}
@@ -43,10 +43,10 @@ class Result {
var s: String /* by */
field = Delegate()
get(): String {
return <this>.#s$delegate.getValue(<this> = <this>.#contextReceiverField0, thisRef = <this>, property = Result::s)
return <this>.#s$delegate.getValue(_context_receiver_0 = <this>.#contextReceiverField0, thisRef = <this>, property = Result::s)
}
set(<set-?>: String) {
return <this>.#s$delegate.setValue(<this> = <this>.#contextReceiverField0, thisRef = <this>, property = Result::s, value = <set-?>)
return <this>.#s$delegate.setValue(_context_receiver_0 = <this>.#contextReceiverField0, thisRef = <this>, property = Result::s, value = <set-?>)
}
}
@@ -20,10 +20,10 @@ FILE fqName:<root> fileName:/canvas.kt
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS INTERFACE name:Shape modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Shape
FUN name:draw visibility:public modality:ABSTRACT <> ($this:<root>.Shape, <this>:<root>.Canvas) returnType:kotlin.String
FUN name:draw visibility:public modality:ABSTRACT <> ($this:<root>.Shape, _context_receiver_0:<root>.Canvas) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.Shape
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.Canvas
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Canvas
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
@@ -43,18 +43,18 @@ FILE fqName:<root> fileName:/canvas.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Circle modality:FINAL visibility:public superTypes:[<root>.Shape]'
FUN name:draw visibility:public modality:OPEN <> ($this:<root>.Circle, <this>:<root>.Canvas) returnType:kotlin.String
FUN name:draw visibility:public modality:OPEN <> ($this:<root>.Circle, _context_receiver_0:<root>.Canvas) returnType:kotlin.String
overridden:
public abstract fun draw (<this>: <root>.Canvas): kotlin.String declared in <root>.Shape
public abstract fun draw (_context_receiver_0: <root>.Canvas): kotlin.String declared in <root>.Shape
$this: VALUE_PARAMETER name:<this> type:<root>.Circle
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.Canvas
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Canvas
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun draw (<this>: <root>.Canvas): kotlin.String declared in <root>.Circle'
RETURN type=kotlin.Nothing from='public open fun draw (_context_receiver_0: <root>.Canvas): kotlin.String declared in <root>.Circle'
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS
$this: CONST String type=kotlin.String value="OK"
other: CALL 'public abstract fun <get-suffix> (): kotlin.String declared in <root>.Canvas' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Canvas declared in <root>.Circle.draw' type=<root>.Canvas origin=null
$this: GET_VAR '_context_receiver_0: <root>.Canvas declared in <root>.Circle.draw' type=<root>.Canvas origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.Shape
@@ -114,6 +114,6 @@ FILE fqName:<root> fileName:/canvas.kt
$receiver: VALUE_PARAMETER name:$this$with type:<root>.MyCanvas
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.box'
CALL 'public open fun draw (<this>: <root>.Canvas): kotlin.String declared in <root>.Circle' type=kotlin.String origin=null
CALL 'public open fun draw (_context_receiver_0: <root>.Canvas): kotlin.String declared in <root>.Circle' type=kotlin.String origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Circle' type=<root>.Circle origin=null
<this>: GET_VAR '$this$with: <root>.MyCanvas declared in <root>.box.<anonymous>' type=<root>.MyCanvas origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.MyCanvas declared in <root>.box.<anonymous>' type=<root>.MyCanvas origin=null
@@ -5,7 +5,7 @@ interface Canvas {
}
interface Shape {
abstract fun draw(<this>: Canvas): String
abstract fun draw(_context_receiver_0: Canvas): String
}
@@ -16,8 +16,8 @@ class Circle : Shape {
}
override fun draw(<this>: Canvas): String {
return "OK".plus(other = <this>.<get-suffix>())
override fun draw(_context_receiver_0: Canvas): String {
return "OK".plus(other = _context_receiver_0.<get-suffix>())
}
}
@@ -37,7 +37,7 @@ object MyCanvas : Canvas {
fun box(): String {
return with<MyCanvas, String>(receiver = MyCanvas, block = local fun MyCanvas.<anonymous>(): String {
return Circle().draw(<this> = $this$with)
return Circle().draw(_context_receiver_0 = $this$with)
}
)
}
@@ -1,117 +0,0 @@
FILE fqName:<root> fileName:/canvas.kt
CLASS INTERFACE name:Canvas modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Canvas
PROPERTY name:suffix visibility:public modality:ABSTRACT [val]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-suffix> visibility:public modality:ABSTRACT <> ($this:<root>.Canvas) returnType:kotlin.String
correspondingProperty: PROPERTY name:suffix visibility:public modality:ABSTRACT [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Canvas
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS INTERFACE name:Shape modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Shape
FUN name:draw visibility:public modality:ABSTRACT <> ($this:<root>.Shape, <this>:<root>.Canvas) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.Shape
VALUE_PARAMETER name:<this> index:0 type:<root>.Canvas
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:Circle modality:FINAL visibility:public superTypes:[<root>.Shape]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Circle
CONSTRUCTOR visibility:public <> () returnType:<root>.Circle [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Circle modality:FINAL visibility:public superTypes:[<root>.Shape]'
FUN name:draw visibility:public modality:OPEN <> ($this:<root>.Circle, <this>:<root>.Canvas) returnType:kotlin.String
overridden:
public abstract fun draw (<this>: <root>.Canvas): kotlin.String declared in <root>.Shape
$this: VALUE_PARAMETER name:<this> type:<root>.Circle
VALUE_PARAMETER name:<this> index:0 type:<root>.Canvas
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun draw (<this>: <root>.Canvas): kotlin.String declared in <root>.Circle'
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS
$this: CONST String type=kotlin.String value="OK"
other: CALL 'public abstract fun <get-suffix> (): kotlin.String declared in <root>.Canvas' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Canvas declared in <root>.Circle.draw' type=<root>.Canvas origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.Shape
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.Shape
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in <root>.Shape
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS OBJECT name:MyCanvas modality:FINAL visibility:public superTypes:[<root>.Canvas]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyCanvas
CONSTRUCTOR visibility:private <> () returnType:<root>.MyCanvas [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:MyCanvas modality:FINAL visibility:public superTypes:[<root>.Canvas]'
PROPERTY name:suffix visibility:public modality:OPEN [val]
overridden:
public abstract suffix: kotlin.String [val]
FIELD PROPERTY_BACKING_FIELD name:suffix type:kotlin.String visibility:private [final]
EXPRESSION_BODY
CONST String type=kotlin.String value=""
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-suffix> visibility:public modality:OPEN <> ($this:<root>.MyCanvas) returnType:kotlin.String
correspondingProperty: PROPERTY name:suffix visibility:public modality:OPEN [val]
overridden:
public abstract fun <get-suffix> (): kotlin.String declared in <root>.Canvas
$this: VALUE_PARAMETER name:<this> type:<root>.MyCanvas
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-suffix> (): kotlin.String declared in <root>.MyCanvas'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:suffix type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyCanvas declared in <root>.MyCanvas.<get-suffix>' type=<root>.MyCanvas origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.Canvas
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.Canvas
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in <root>.Canvas
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.String origin=null
<T>: <root>.MyCanvas
<R>: kotlin.String
receiver: GET_OBJECT 'CLASS OBJECT name:MyCanvas modality:FINAL visibility:public superTypes:[<root>.Canvas]' type=<root>.MyCanvas
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<<root>.MyCanvas, kotlin.String> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.MyCanvas) returnType:kotlin.String
$receiver: VALUE_PARAMETER name:$this$with type:<root>.MyCanvas
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.box'
CALL 'public open fun draw (<this>: <root>.Canvas): kotlin.String declared in <root>.Circle' type=kotlin.String origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Circle' type=<root>.Circle origin=null
<this>: GET_VAR '$this$with: <root>.MyCanvas declared in <root>.box.<anonymous>' type=<root>.MyCanvas origin=null
@@ -157,35 +157,35 @@ FILE fqName:<root> fileName:/compareTo.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.Pair'
CONST Boolean type=kotlin.Boolean value=true
FUN name:compareTo visibility:public modality:FINAL <T> ($receiver:T of <root>.compareTo, <this>:java.util.Comparator<T of <root>.compareTo>{ kotlin.TypeAliasesKt.Comparator<T of <root>.compareTo> }, other:T of <root>.compareTo) returnType:kotlin.Int [operator,infix]
FUN name:compareTo visibility:public modality:FINAL <T> ($receiver:T of <root>.compareTo, _context_receiver_0:java.util.Comparator<T of <root>.compareTo>{ kotlin.TypeAliasesKt.Comparator<T of <root>.compareTo> }, other:T of <root>.compareTo) returnType:kotlin.Int [operator,infix]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:T of <root>.compareTo
VALUE_PARAMETER name:<this> index:0 type:java.util.Comparator<T of <root>.compareTo>{ kotlin.TypeAliasesKt.Comparator<T of <root>.compareTo> }
VALUE_PARAMETER name:_context_receiver_0 index:0 type:java.util.Comparator<T of <root>.compareTo>{ kotlin.TypeAliasesKt.Comparator<T of <root>.compareTo> }
VALUE_PARAMETER name:other index:1 type:T of <root>.compareTo
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun compareTo <T> (<this>: java.util.Comparator<T of <root>.compareTo>{ kotlin.TypeAliasesKt.Comparator<T of <root>.compareTo> }, other: T of <root>.compareTo): kotlin.Int [operator,infix] declared in <root>'
RETURN type=kotlin.Nothing from='public final fun compareTo <T> (_context_receiver_0: java.util.Comparator<T of <root>.compareTo>{ kotlin.TypeAliasesKt.Comparator<T of <root>.compareTo> }, other: T of <root>.compareTo): kotlin.Int [operator,infix] declared in <root>'
CALL 'public abstract fun compare (p0: @[FlexibleNullability] T of java.util.Comparator?, p1: @[FlexibleNullability] T of java.util.Comparator?): kotlin.Int declared in java.util.Comparator' type=kotlin.Int origin=null
$this: GET_VAR '<this>: java.util.Comparator<T of <root>.compareTo>{ kotlin.TypeAliasesKt.Comparator<T of <root>.compareTo> } declared in <root>.compareTo' type=java.util.Comparator<T of <root>.compareTo>{ kotlin.TypeAliasesKt.Comparator<T of <root>.compareTo> } origin=null
$this: GET_VAR '_context_receiver_0: java.util.Comparator<T of <root>.compareTo>{ kotlin.TypeAliasesKt.Comparator<T of <root>.compareTo> } declared in <root>.compareTo' type=java.util.Comparator<T of <root>.compareTo>{ kotlin.TypeAliasesKt.Comparator<T of <root>.compareTo> } origin=null
p0: GET_VAR '<this>: T of <root>.compareTo declared in <root>.compareTo' type=T of <root>.compareTo origin=null
p1: GET_VAR 'other: T of <root>.compareTo declared in <root>.compareTo' type=T of <root>.compareTo origin=null
PROPERTY name:min visibility:public modality:FINAL [val]
FUN name:<get-min> visibility:public modality:FINAL <T> ($receiver:<root>.Pair<T of <root>.<get-min>, T of <root>.<get-min>>, <this>:java.util.Comparator<T of <root>.<get-min>>{ kotlin.TypeAliasesKt.Comparator<T of <root>.<get-min>> }) returnType:T of <root>.<get-min>
FUN name:<get-min> visibility:public modality:FINAL <T> ($receiver:<root>.Pair<T of <root>.<get-min>, T of <root>.<get-min>>, _context_receiver_0:java.util.Comparator<T of <root>.<get-min>>{ kotlin.TypeAliasesKt.Comparator<T of <root>.<get-min>> }) returnType:T of <root>.<get-min>
correspondingProperty: PROPERTY name:min visibility:public modality:FINAL [val]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Pair<T of <root>.<get-min>, T of <root>.<get-min>>
VALUE_PARAMETER name:<this> index:0 type:java.util.Comparator<T of <root>.<get-min>>{ kotlin.TypeAliasesKt.Comparator<T of <root>.<get-min>> }
VALUE_PARAMETER name:_context_receiver_0 index:0 type:java.util.Comparator<T of <root>.<get-min>>{ kotlin.TypeAliasesKt.Comparator<T of <root>.<get-min>> }
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-min> <T> (<this>: java.util.Comparator<T of <root>.<get-min>>{ kotlin.TypeAliasesKt.Comparator<T of <root>.<get-min>> }): T of <root>.<get-min> declared in <root>'
RETURN type=kotlin.Nothing from='public final fun <get-min> <T> (_context_receiver_0: java.util.Comparator<T of <root>.<get-min>>{ kotlin.TypeAliasesKt.Comparator<T of <root>.<get-min>> }): T of <root>.<get-min> declared in <root>'
WHEN type=T of <root>.<get-min> origin=IF
BRANCH
if: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: CALL 'public final fun compareTo <T> (<this>: java.util.Comparator<T of <root>.compareTo>{ kotlin.TypeAliasesKt.Comparator<T of <root>.compareTo> }, other: T of <root>.compareTo): kotlin.Int [operator,infix] declared in <root>' type=kotlin.Int origin=LT
arg0: CALL 'public final fun compareTo <T> (_context_receiver_0: java.util.Comparator<T of <root>.compareTo>{ kotlin.TypeAliasesKt.Comparator<T of <root>.compareTo> }, other: T of <root>.compareTo): kotlin.Int [operator,infix] declared in <root>' type=kotlin.Int origin=LT
<T>: T of <root>.<get-min>
$receiver: CALL 'public final fun <get-first> (): A of <root>.Pair declared in <root>.Pair' type=T of <root>.<get-min> origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Pair<T of <root>.<get-min>, T of <root>.<get-min>> declared in <root>.<get-min>' type=<root>.Pair<T of <root>.<get-min>, T of <root>.<get-min>> origin=null
<this>: GET_VAR '<this>: java.util.Comparator<T of <root>.<get-min>>{ kotlin.TypeAliasesKt.Comparator<T of <root>.<get-min>> } declared in <root>.<get-min>' type=java.util.Comparator<T of <root>.<get-min>>{ kotlin.TypeAliasesKt.Comparator<T of <root>.<get-min>> } origin=null
_context_receiver_0: GET_VAR '_context_receiver_0: java.util.Comparator<T of <root>.<get-min>>{ kotlin.TypeAliasesKt.Comparator<T of <root>.<get-min>> } declared in <root>.<get-min>' type=java.util.Comparator<T of <root>.<get-min>>{ kotlin.TypeAliasesKt.Comparator<T of <root>.<get-min>> } origin=null
other: CALL 'public final fun <get-second> (): B of <root>.Pair declared in <root>.Pair' type=T of <root>.<get-min> origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Pair<T of <root>.<get-min>, T of <root>.<get-min>> declared in <root>.<get-min>' type=<root>.Pair<T of <root>.<get-min>, T of <root>.<get-min>> origin=null
arg1: CONST Int type=kotlin.Int value=0
@@ -238,11 +238,11 @@ FILE fqName:<root> fileName:/compareTo.kt
$receiver: VALUE_PARAMETER name:$this$with type:java.util.Comparator<kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.box'
CALL 'public final fun <get-min> <T> (<this>: java.util.Comparator<T of <root>.<get-min>>{ kotlin.TypeAliasesKt.Comparator<T of <root>.<get-min>> }): T of <root>.<get-min> declared in <root>' type=kotlin.String origin=GET_PROPERTY
CALL 'public final fun <get-min> <T> (_context_receiver_0: java.util.Comparator<T of <root>.<get-min>>{ kotlin.TypeAliasesKt.Comparator<T of <root>.<get-min>> }): T of <root>.<get-min> declared in <root>' type=kotlin.String origin=GET_PROPERTY
<T>: kotlin.String
$receiver: CONSTRUCTOR_CALL 'public constructor <init> (first: A of <root>.Pair, second: B of <root>.Pair) [primary] declared in <root>.Pair' type=<root>.Pair<kotlin.String, kotlin.String> origin=null
<class: A>: kotlin.String
<class: B>: kotlin.String
first: CONST String type=kotlin.String value="OK"
second: CONST String type=kotlin.String value="fail"
<this>: GET_VAR '$this$with: java.util.Comparator<kotlin.String> declared in <root>.box.<anonymous>' type=java.util.Comparator<kotlin.String> origin=null
_context_receiver_0: GET_VAR '$this$with: java.util.Comparator<kotlin.String> declared in <root>.box.<anonymous>' type=java.util.Comparator<kotlin.String> origin=null
@@ -60,14 +60,14 @@ data class Pair<A : Any?, B : Any?> {
}
infix operator fun <T : Any?> T.compareTo(<this>: Comparator<T>, other: T): Int {
return <this>.compare(p0 = <this>, p1 = other)
infix operator fun <T : Any?> T.compareTo(_context_receiver_0: Comparator<T>, other: T): Int {
return _context_receiver_0.compare(p0 = <this>, p1 = other)
}
val <T : Any?> Pair<T, T>.min: T
get(<this>: Comparator<T>): T {
get(_context_receiver_0: Comparator<T>): T {
return when {
less(arg0 = <this>.<get-first>().compareTo<T>(<this> = <this>, other = <this>.<get-second>()), arg1 = 0) -> <this>.<get-first>()
less(arg0 = <this>.<get-first>().compareTo<T>(_context_receiver_0 = _context_receiver_0, other = <this>.<get-second>()), arg1 = 0) -> <this>.<get-first>()
else -> <this>.<get-second>()
}
}
@@ -84,7 +84,7 @@ fun box(): String {
}
/*-> Comparator<String> */
return with<Comparator<String>, String>(receiver = comparator, block = local fun Comparator<String>.<anonymous>(): String {
return Pair<String, String>(first = "OK", second = "fail").<get-min><String>(<this> = $this$with)
return Pair<String, String>(first = "OK", second = "fail").<get-min><String>(_context_receiver_0 = $this$with)
}
)
}
@@ -30,16 +30,16 @@ FILE fqName:<root> fileName:/dp.kt
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY name:dp visibility:public modality:FINAL [val]
FUN name:<get-dp> visibility:public modality:FINAL <> ($receiver:kotlin.Int, <this>:<root>.View) returnType:kotlin.Int
FUN name:<get-dp> visibility:public modality:FINAL <> ($receiver:kotlin.Int, _context_receiver_0:<root>.View) returnType:kotlin.Int
correspondingProperty: PROPERTY name:dp visibility:public modality:FINAL [val]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
VALUE_PARAMETER name:<this> index:0 type:<root>.View
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.View
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-dp> (<this>: <root>.View): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun <get-dp> (_context_receiver_0: <root>.View): kotlin.Int declared in <root>'
CALL 'public final fun times (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=MUL
$this: CALL 'public final fun <get-coefficient> (): kotlin.Int declared in <root>.View' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.View declared in <root>.<get-dp>' type=<root>.View origin=null
$this: GET_VAR '_context_receiver_0: <root>.View declared in <root>.<get-dp>' type=<root>.View origin=null
other: GET_VAR '<this>: kotlin.Int declared in <root>.<get-dp>' type=kotlin.Int origin=null
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
@@ -68,9 +68,9 @@ FILE fqName:<root> fileName:/dp.kt
VALUE_PARAMETER name:it index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (it: kotlin.Int): kotlin.Int declared in <root>.box.<anonymous>'
CALL 'public final fun <get-dp> (<this>: <root>.View): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
CALL 'public final fun <get-dp> (_context_receiver_0: <root>.View): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
$receiver: GET_VAR 'it: kotlin.Int declared in <root>.box.<anonymous>.<anonymous>' type=kotlin.Int origin=null
<this>: GET_VAR '$this$with: <root>.View declared in <root>.box.<anonymous>' type=<root>.View origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.View declared in <root>.box.<anonymous>' type=<root>.View origin=null
arg1: CALL 'public final fun listOf <T> (vararg elements: T of kotlin.collections.CollectionsKt.listOf): kotlin.collections.List<T of kotlin.collections.CollectionsKt.listOf> declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<kotlin.Int> origin=null
<T>: kotlin.Int
elements: VARARG type=kotlin.Array<out kotlin.Int> varargElementType=kotlin.Int
@@ -12,15 +12,15 @@ class View {
}
val Int.dp: Int
get(<this>: View): Int {
return <this>.<get-coefficient>().times(other = <this>)
get(_context_receiver_0: View): Int {
return _context_receiver_0.<get-coefficient>().times(other = <this>)
}
fun box(): String {
with<View, Nothing>(receiver = View(), block = local fun View.<anonymous>(): Nothing {
when {
EQEQ(arg0 = listOf<Int>(elements = [1, 2, 10]).map<Int, Int>(transform = local fun <anonymous>(it: Int): Int {
return it.<get-dp>(<this> = $this$with)
return it.<get-dp>(_context_receiver_0 = $this$with)
}
), arg1 = listOf<Int>(elements = [42, 84, 420])) -> { // BLOCK
return "OK"
@@ -1,83 +0,0 @@
FILE fqName:<root> fileName:/dp.kt
CLASS CLASS name:View modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.View
CONSTRUCTOR visibility:public <> () returnType:<root>.View [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:View modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:coefficient visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:coefficient type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=42
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-coefficient> visibility:public modality:FINAL <> ($this:<root>.View) returnType:kotlin.Int
correspondingProperty: PROPERTY name:coefficient visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.View
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-coefficient> (): kotlin.Int declared in <root>.View'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:coefficient type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.View declared in <root>.View.<get-coefficient>' type=<root>.View origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY name:dp visibility:public modality:FINAL [val]
FUN name:<get-dp> visibility:public modality:FINAL <> ($receiver:kotlin.Int, <this>:<root>.View) returnType:kotlin.Int
correspondingProperty: PROPERTY name:dp visibility:public modality:FINAL [val]
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
VALUE_PARAMETER name:<this> index:0 type:<root>.View
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-dp> (<this>: <root>.View): kotlin.Int declared in <root>'
CALL 'public final fun times (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=MUL
$this: CALL 'public final fun <get-coefficient> (): kotlin.Int declared in <root>.View' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.View declared in <root>.<get-dp>' type=<root>.View origin=null
other: GET_VAR '<this>: kotlin.Int declared in <root>.<get-dp>' type=kotlin.Int origin=null
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
<T>: <root>.View
<R>: kotlin.Nothing
receiver: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.View' type=<root>.View origin=null
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<<root>.View, kotlin.Nothing> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.View) returnType:kotlin.Nothing
$receiver: VALUE_PARAMETER name:$this$with type:<root>.View
BLOCK_BODY
WHEN type=kotlin.Unit origin=IF
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: CALL 'public final fun map <T, R> (transform: kotlin.Function1<T of kotlin.collections.CollectionsKt.map, R of kotlin.collections.CollectionsKt.map>): kotlin.collections.List<R of kotlin.collections.CollectionsKt.map> [inline] declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<kotlin.Int> origin=null
<T>: kotlin.Int
<R>: kotlin.Int
$receiver: CALL 'public final fun listOf <T> (vararg elements: T of kotlin.collections.CollectionsKt.listOf): kotlin.collections.List<T of kotlin.collections.CollectionsKt.listOf> declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<kotlin.Int> origin=null
<T>: kotlin.Int
elements: VARARG type=kotlin.Array<out kotlin.Int> varargElementType=kotlin.Int
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CONST Int type=kotlin.Int value=10
transform: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Int
VALUE_PARAMETER name:it index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (it: kotlin.Int): kotlin.Int declared in <root>.box.<anonymous>'
CALL 'public final fun <get-dp> (<this>: <root>.View): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
$receiver: GET_VAR 'it: kotlin.Int declared in <root>.box.<anonymous>.<anonymous>' type=kotlin.Int origin=null
<this>: GET_VAR '$this$with: <root>.View declared in <root>.box.<anonymous>' type=<root>.View origin=null
arg1: CALL 'public final fun listOf <T> (vararg elements: T of kotlin.collections.CollectionsKt.listOf): kotlin.collections.List<T of kotlin.collections.CollectionsKt.listOf> declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<kotlin.Int> origin=null
<T>: kotlin.Int
elements: VARARG type=kotlin.Array<out kotlin.Int> varargElementType=kotlin.Int
CONST Int type=kotlin.Int value=42
CONST Int type=kotlin.Int value=84
CONST Int type=kotlin.Int value=420
then: BLOCK type=kotlin.Unit origin=null
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
CONST String type=kotlin.String value="OK"
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
CONST String type=kotlin.String value="fail"
@@ -78,17 +78,17 @@ FILE fqName:<root> fileName:/functionalType.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:f visibility:public modality:FINAL <T> ($receiver:<root>.K, <this>:<root>.O, g:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>) returnType:T of <root>.f
FUN name:f visibility:public modality:FINAL <T> ($receiver:<root>.K, _context_receiver_0:<root>.O, g:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>) returnType:T of <root>.f
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.K
VALUE_PARAMETER name:<this> index:0 type:<root>.O
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.O
VALUE_PARAMETER name:g index:1 type:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun f <T> (<this>: <root>.O, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>): T of <root>.f declared in <root>'
RETURN type=kotlin.Nothing from='public final fun f <T> (_context_receiver_0: <root>.O, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>): T of <root>.f declared in <root>'
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function3, p2: P2 of kotlin.Function3, p3: P3 of kotlin.Function3): R of kotlin.Function3 [operator] declared in kotlin.Function3' type=T of <root>.f origin=INVOKE
$this: GET_VAR 'g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f> declared in <root>.f' type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f> origin=VARIABLE_AS_FUNCTION
p1: GET_VAR '<this>: <root>.O declared in <root>.f' type=<root>.O origin=null
p1: GET_VAR '_context_receiver_0: <root>.O declared in <root>.f' type=<root>.O origin=null
p2: GET_VAR '<this>: <root>.K declared in <root>.f' type=<root>.K origin=null
p3: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Param' type=<root>.Param origin=null
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
@@ -103,18 +103,18 @@ FILE fqName:<root> fileName:/functionalType.kt
$receiver: VALUE_PARAMETER name:$this$with type:<root>.O
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.box'
CALL 'public final fun f <T> (<this>: <root>.O, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>): T of <root>.f declared in <root>' type=kotlin.String origin=null
CALL 'public final fun f <T> (_context_receiver_0: <root>.O, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>): T of <root>.f declared in <root>' type=kotlin.String origin=null
<T>: kotlin.String
$receiver: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.K' type=<root>.K origin=null
<this>: GET_VAR '$this$with: <root>.O declared in <root>.box.<anonymous>' type=<root>.O origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.O declared in <root>.box.<anonymous>' type=<root>.O origin=null
g: FUN_EXPR type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, kotlin.String> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.K, <this>:<root>.O, it:<root>.Param) returnType:kotlin.String
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.K, _context_receiver_0:<root>.O, it:<root>.Param) returnType:kotlin.String
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:$this$f type:<root>.K
VALUE_PARAMETER name:<this> index:0 type:<root>.O
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.O
VALUE_PARAMETER name:it index:1 type:<root>.Param
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (<this>: <root>.O, it: <root>.Param): kotlin.String declared in <root>.box.<anonymous>'
RETURN type=kotlin.Nothing from='local final fun <anonymous> (_context_receiver_0: <root>.O, it: <root>.Param): kotlin.String declared in <root>.box.<anonymous>'
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS
$this: CALL 'public final fun <get-o> (): kotlin.String declared in <root>.O' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '$this$with: <root>.O declared in <root>.box.<anonymous>' type=<root>.O origin=null
@@ -33,13 +33,13 @@ class K {
}
fun <T : Any?> K.f(<this>: O, g: @ExtensionFunctionType @ContextFunctionTypeParams(count = 1) Function3<O, K, Param, T>): T {
return g.invoke(p1 = <this>, p2 = <this>, p3 = Param())
fun <T : Any?> K.f(_context_receiver_0: O, g: @ExtensionFunctionType @ContextFunctionTypeParams(count = 1) Function3<O, K, Param, T>): T {
return g.invoke(p1 = _context_receiver_0, p2 = <this>, p3 = Param())
}
fun box(): String {
return with<O, String>(receiver = O(), block = local fun O.<anonymous>(): String {
return K().f<String>(<this> = $this$with, g = local fun K.<anonymous>(<this>: O, it: Param): String {
return K().f<String>(_context_receiver_0 = $this$with, g = local fun K.<anonymous>(_context_receiver_0: O, it: Param): String {
return $this$with.<get-o>().plus(other = $this$f.<get-k>())
}
)
@@ -1,121 +0,0 @@
FILE fqName:<root> fileName:/functionalType.kt
CLASS CLASS name:Param modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Param
CONSTRUCTOR visibility:public <> () returnType:<root>.Param [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Param modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:O modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.O
CONSTRUCTOR visibility:public <> () returnType:<root>.O [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:O modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:o visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:o type:kotlin.String visibility:private [final]
EXPRESSION_BODY
CONST String type=kotlin.String value="O"
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-o> visibility:public modality:FINAL <> ($this:<root>.O) returnType:kotlin.String
correspondingProperty: PROPERTY name:o visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.O
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-o> (): kotlin.String declared in <root>.O'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:o type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.O declared in <root>.O.<get-o>' type=<root>.O origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:K modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.K
CONSTRUCTOR visibility:public <> () returnType:<root>.K [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:k visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:k type:kotlin.String visibility:private [final]
EXPRESSION_BODY
CONST String type=kotlin.String value="K"
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-k> visibility:public modality:FINAL <> ($this:<root>.K) returnType:kotlin.String
correspondingProperty: PROPERTY name:k visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.K
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-k> (): kotlin.String declared in <root>.K'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:k type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.K declared in <root>.K.<get-k>' type=<root>.K origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:f visibility:public modality:FINAL <T> ($receiver:<root>.K, <this>:<root>.O, g:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>) returnType:T of <root>.f
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
$receiver: VALUE_PARAMETER name:<this> type:<root>.K
VALUE_PARAMETER name:<this> index:0 type:<root>.O
VALUE_PARAMETER name:g index:1 type:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun f <T> (<this>: <root>.O, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>): T of <root>.f declared in <root>'
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function3, p2: P2 of kotlin.Function3, p3: P3 of kotlin.Function3): R of kotlin.Function3 [operator] declared in kotlin.Function3' type=T of <root>.f origin=INVOKE
$this: GET_VAR 'g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f> declared in <root>.f' type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f> origin=VARIABLE_AS_FUNCTION
p1: GET_VAR '<this>: <root>.O declared in <root>.f' type=<root>.O origin=null
p2: GET_VAR '<this>: <root>.K declared in <root>.f' type=<root>.K origin=null
p3: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Param' type=<root>.Param origin=null
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.String origin=null
<T>: <root>.O
<R>: kotlin.String
receiver: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.O' type=<root>.O origin=null
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<<root>.O, kotlin.String> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.O) returnType:kotlin.String
$receiver: VALUE_PARAMETER name:$this$with type:<root>.O
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.box'
CALL 'public final fun f <T> (<this>: <root>.O, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>): T of <root>.f declared in <root>' type=kotlin.String origin=null
<T>: kotlin.String
$receiver: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.K' type=<root>.K origin=null
<this>: TYPE_OP type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, kotlin.String> origin=IMPLICIT_CAST typeOperand=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, kotlin.String>
GET_VAR '$this$with: <root>.O declared in <root>.box.<anonymous>' type=<root>.O origin=null
g: FUN_EXPR type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.O, <root>.K, <root>.Param, kotlin.String> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.K, <this>:<root>.O, it:<root>.Param) returnType:kotlin.String
$receiver: VALUE_PARAMETER name:$this$f type:<root>.K
VALUE_PARAMETER name:<this> index:0 type:<root>.O
VALUE_PARAMETER name:it index:1 type:<root>.Param
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (<this>: <root>.O, it: <root>.Param): kotlin.String declared in <root>.box.<anonymous>'
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS
$this: CALL 'public final fun <get-o> (): kotlin.String declared in <root>.O' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '$this$with: <root>.O declared in <root>.box.<anonymous>' type=<root>.O origin=null
other: CALL 'public final fun <get-k> (): kotlin.String declared in <root>.K' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '$this$f: <root>.K declared in <root>.box.<anonymous>.<anonymous>' type=<root>.K origin=null
@@ -135,19 +135,19 @@ FILE fqName:<root> fileName:/monoidSum.kt
overridden:
public open fun toString (): kotlin.String [fake_override] declared in <root>.Monoid
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:sum visibility:public modality:FINAL <T> ($receiver:kotlin.collections.List<T of <root>.sum>, <this>:<root>.Monoid<T of <root>.sum>) returnType:T of <root>.sum
FUN name:sum visibility:public modality:FINAL <T> ($receiver:kotlin.collections.List<T of <root>.sum>, _context_receiver_0:<root>.Monoid<T of <root>.sum>) returnType:T of <root>.sum
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:kotlin.collections.List<T of <root>.sum>
VALUE_PARAMETER name:<this> index:0 type:<root>.Monoid<T of <root>.sum>
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Monoid<T of <root>.sum>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun sum <T> (<this>: <root>.Monoid<T of <root>.sum>): T of <root>.sum declared in <root>'
RETURN type=kotlin.Nothing from='public final fun sum <T> (_context_receiver_0: <root>.Monoid<T of <root>.sum>): T of <root>.sum declared in <root>'
CALL 'public final fun fold <T, R> (initial: R of kotlin.collections.CollectionsKt.fold, operation: kotlin.Function2<@[ParameterName(name = 'acc')] R of kotlin.collections.CollectionsKt.fold, T of kotlin.collections.CollectionsKt.fold, R of kotlin.collections.CollectionsKt.fold>): R of kotlin.collections.CollectionsKt.fold [inline] declared in kotlin.collections.CollectionsKt' type=T of <root>.sum origin=null
<T>: T of <root>.sum
<R>: T of <root>.sum
$receiver: GET_VAR '<this>: kotlin.collections.List<T of <root>.sum> declared in <root>.sum' type=kotlin.collections.List<T of <root>.sum> origin=null
initial: CALL 'public abstract fun <get-unit> (): T of <root>.Monoid declared in <root>.Monoid' type=T of <root>.sum origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Monoid<T of <root>.sum> declared in <root>.sum' type=<root>.Monoid<T of <root>.sum> origin=null
$this: GET_VAR '_context_receiver_0: <root>.Monoid<T of <root>.sum> declared in <root>.sum' type=<root>.Monoid<T of <root>.sum> origin=null
operation: FUN_EXPR type=kotlin.Function2<@[ParameterName(name = 'acc')] T of <root>.sum, T of <root>.sum, T of <root>.sum> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (acc:T of <root>.sum, e:T of <root>.sum) returnType:T of <root>.sum
VALUE_PARAMETER name:acc index:0 type:T of <root>.sum
@@ -155,7 +155,7 @@ FILE fqName:<root> fileName:/monoidSum.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (acc: T of <root>.sum, e: T of <root>.sum): T of <root>.sum declared in <root>.sum'
CALL 'public abstract fun combine (other: T of <root>.Monoid): T of <root>.Monoid [fake_override,infix] declared in <root>.Monoid' type=T of <root>.sum origin=null
$this: GET_VAR '<this>: <root>.Monoid<T of <root>.sum> declared in <root>.sum' type=<root>.Monoid<T of <root>.sum> origin=null
$this: GET_VAR '_context_receiver_0: <root>.Monoid<T of <root>.sum> declared in <root>.sum' type=<root>.Monoid<T of <root>.sum> origin=null
$receiver: GET_VAR 'acc: T of <root>.sum declared in <root>.sum.<anonymous>' type=T of <root>.sum origin=null
other: GET_VAR 'e: T of <root>.sum declared in <root>.sum.<anonymous>' type=T of <root>.sum origin=null
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
@@ -170,7 +170,7 @@ FILE fqName:<root> fileName:/monoidSum.kt
$receiver: VALUE_PARAMETER name:$this$with type:<root>.IntMonoid
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.box'
CALL 'public final fun sum <T> (<this>: <root>.Monoid<T of <root>.sum>): T of <root>.sum declared in <root>' type=kotlin.Int origin=null
CALL 'public final fun sum <T> (_context_receiver_0: <root>.Monoid<T of <root>.sum>): T of <root>.sum declared in <root>' type=kotlin.Int origin=null
<T>: kotlin.Int
$receiver: CALL 'public final fun listOf <T> (vararg elements: T of kotlin.collections.CollectionsKt.listOf): kotlin.collections.List<T of kotlin.collections.CollectionsKt.listOf> declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<kotlin.Int> origin=null
<T>: kotlin.Int
@@ -178,7 +178,7 @@ FILE fqName:<root> fileName:/monoidSum.kt
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CONST Int type=kotlin.Int value=3
<this>: GET_VAR '$this$with: <root>.IntMonoid declared in <root>.box.<anonymous>' type=<root>.IntMonoid origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.IntMonoid declared in <root>.box.<anonymous>' type=<root>.IntMonoid origin=null
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.String origin=null
<T>: <root>.StringMonoid
@@ -189,11 +189,11 @@ FILE fqName:<root> fileName:/monoidSum.kt
$receiver: VALUE_PARAMETER name:$this$with type:<root>.StringMonoid
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.box'
CALL 'public final fun sum <T> (<this>: <root>.Monoid<T of <root>.sum>): T of <root>.sum declared in <root>' type=kotlin.String origin=null
CALL 'public final fun sum <T> (_context_receiver_0: <root>.Monoid<T of <root>.sum>): T of <root>.sum declared in <root>' type=kotlin.String origin=null
<T>: kotlin.String
$receiver: CALL 'public final fun listOf <T> (vararg elements: T of kotlin.collections.CollectionsKt.listOf): kotlin.collections.List<T of kotlin.collections.CollectionsKt.listOf> declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<kotlin.String> origin=null
<T>: kotlin.String
elements: VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
CONST String type=kotlin.String value="O"
CONST String type=kotlin.String value="K"
<this>: GET_VAR '$this$with: <root>.StringMonoid declared in <root>.box.<anonymous>' type=<root>.StringMonoid origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.StringMonoid declared in <root>.box.<anonymous>' type=<root>.StringMonoid origin=null
@@ -43,20 +43,20 @@ object StringMonoid : Monoid<String> {
}
fun <T : Any?> List<T>.sum(<this>: Monoid<T>): T {
return <this>.fold<T, T>(initial = <this>.<get-unit>(), operation = local fun <anonymous>(acc: T, e: T): T {
return (<this>, acc).combine(other = e)
fun <T : Any?> List<T>.sum(_context_receiver_0: Monoid<T>): T {
return <this>.fold<T, T>(initial = _context_receiver_0.<get-unit>(), operation = local fun <anonymous>(acc: T, e: T): T {
return (_context_receiver_0, acc).combine(other = e)
}
)
}
fun box(): String {
with<IntMonoid, Int>(receiver = IntMonoid, block = local fun IntMonoid.<anonymous>(): Int {
return listOf<Int>(elements = [1, 2, 3]).sum<Int>(<this> = $this$with)
return listOf<Int>(elements = [1, 2, 3]).sum<Int>(_context_receiver_0 = $this$with)
}
) /*~> Unit */
return with<StringMonoid, String>(receiver = StringMonoid, block = local fun StringMonoid.<anonymous>(): String {
return listOf<String>(elements = ["O", "K"]).sum<String>(<this> = $this$with)
return listOf<String>(elements = ["O", "K"]).sum<String>(_context_receiver_0 = $this$with)
}
)
}
@@ -1,198 +0,0 @@
FILE fqName:<root> fileName:/monoidSum.kt
CLASS INTERFACE name:Semigroup modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Semigroup<T of <root>.Semigroup>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
FUN name:combine visibility:public modality:ABSTRACT <> ($this:<root>.Semigroup<T of <root>.Semigroup>, $receiver:T of <root>.Semigroup, other:T of <root>.Semigroup) returnType:T of <root>.Semigroup [infix]
$this: VALUE_PARAMETER name:<this> type:<root>.Semigroup<T of <root>.Semigroup>
$receiver: VALUE_PARAMETER name:<this> type:T of <root>.Semigroup
VALUE_PARAMETER name:other index:0 type:T of <root>.Semigroup
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS INTERFACE name:Monoid modality:ABSTRACT visibility:public superTypes:[<root>.Semigroup<T of <root>.Monoid>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Monoid<T of <root>.Monoid>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
PROPERTY name:unit visibility:public modality:ABSTRACT [val]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-unit> visibility:public modality:ABSTRACT <> ($this:<root>.Monoid<T of <root>.Monoid>) returnType:T of <root>.Monoid
correspondingProperty: PROPERTY name:unit visibility:public modality:ABSTRACT [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Monoid<T of <root>.Monoid>
FUN FAKE_OVERRIDE name:combine visibility:public modality:ABSTRACT <> ($this:<root>.Semigroup<T of <root>.Monoid>, $receiver:T of <root>.Monoid, other:T of <root>.Monoid) returnType:T of <root>.Monoid [fake_override,infix]
overridden:
public abstract fun combine (other: T of <root>.Semigroup): T of <root>.Semigroup [infix] declared in <root>.Semigroup
$this: VALUE_PARAMETER name:<this> type:<root>.Semigroup<T of <root>.Monoid>
$receiver: VALUE_PARAMETER name:<this> type:T of <root>.Monoid
VALUE_PARAMETER name:other index:0 type:T of <root>.Monoid
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.Semigroup
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.Semigroup
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in <root>.Semigroup
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS OBJECT name:IntMonoid modality:FINAL visibility:public superTypes:[<root>.Monoid<kotlin.Int>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.IntMonoid
CONSTRUCTOR visibility:private <> () returnType:<root>.IntMonoid [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:IntMonoid modality:FINAL visibility:public superTypes:[<root>.Monoid<kotlin.Int>]'
FUN name:combine visibility:public modality:OPEN <> ($this:<root>.IntMonoid, $receiver:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [infix]
overridden:
public abstract fun combine (other: T of <root>.Monoid): T of <root>.Monoid [fake_override,infix] declared in <root>.Monoid
$this: VALUE_PARAMETER name:<this> type:<root>.IntMonoid
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
VALUE_PARAMETER name:other index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun combine (other: kotlin.Int): kotlin.Int [infix] declared in <root>.IntMonoid'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.IntMonoid.combine' type=kotlin.Int origin=null
other: GET_VAR 'other: kotlin.Int declared in <root>.IntMonoid.combine' type=kotlin.Int origin=null
PROPERTY name:unit visibility:public modality:OPEN [val]
overridden:
public abstract unit: T of <root>.Monoid [val]
FIELD PROPERTY_BACKING_FIELD name:unit type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-unit> visibility:public modality:OPEN <> ($this:<root>.IntMonoid) returnType:kotlin.Int
correspondingProperty: PROPERTY name:unit visibility:public modality:OPEN [val]
overridden:
public abstract fun <get-unit> (): T of <root>.Monoid declared in <root>.Monoid
$this: VALUE_PARAMETER name:<this> type:<root>.IntMonoid
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-unit> (): kotlin.Int declared in <root>.IntMonoid'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:unit type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.IntMonoid declared in <root>.IntMonoid.<get-unit>' type=<root>.IntMonoid origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.Monoid
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.Monoid
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in <root>.Monoid
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS OBJECT name:StringMonoid modality:FINAL visibility:public superTypes:[<root>.Monoid<kotlin.String>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.StringMonoid
CONSTRUCTOR visibility:private <> () returnType:<root>.StringMonoid [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:StringMonoid modality:FINAL visibility:public superTypes:[<root>.Monoid<kotlin.String>]'
FUN name:combine visibility:public modality:OPEN <> ($this:<root>.StringMonoid, $receiver:kotlin.String, other:kotlin.String) returnType:kotlin.String [infix]
overridden:
public abstract fun combine (other: T of <root>.Monoid): T of <root>.Monoid [fake_override,infix] declared in <root>.Monoid
$this: VALUE_PARAMETER name:<this> type:<root>.StringMonoid
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
VALUE_PARAMETER name:other index:0 type:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun combine (other: kotlin.String): kotlin.String [infix] declared in <root>.StringMonoid'
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS
$this: GET_VAR '<this>: kotlin.String declared in <root>.StringMonoid.combine' type=kotlin.String origin=null
other: GET_VAR 'other: kotlin.String declared in <root>.StringMonoid.combine' type=kotlin.String origin=null
PROPERTY name:unit visibility:public modality:OPEN [val]
overridden:
public abstract unit: T of <root>.Monoid [val]
FIELD PROPERTY_BACKING_FIELD name:unit type:kotlin.String visibility:private [final]
EXPRESSION_BODY
CONST String type=kotlin.String value=""
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-unit> visibility:public modality:OPEN <> ($this:<root>.StringMonoid) returnType:kotlin.String
correspondingProperty: PROPERTY name:unit visibility:public modality:OPEN [val]
overridden:
public abstract fun <get-unit> (): T of <root>.Monoid declared in <root>.Monoid
$this: VALUE_PARAMETER name:<this> type:<root>.StringMonoid
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-unit> (): kotlin.String declared in <root>.StringMonoid'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:unit type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.StringMonoid declared in <root>.StringMonoid.<get-unit>' type=<root>.StringMonoid origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.Monoid
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.Monoid
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in <root>.Monoid
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:sum visibility:public modality:FINAL <T> ($receiver:kotlin.collections.List<T of <root>.sum>, <this>:<root>.Monoid<T of <root>.sum>) returnType:T of <root>.sum
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
$receiver: VALUE_PARAMETER name:<this> type:kotlin.collections.List<T of <root>.sum>
VALUE_PARAMETER name:<this> index:0 type:<root>.Monoid<T of <root>.sum>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun sum <T> (<this>: <root>.Monoid<T of <root>.sum>): T of <root>.sum declared in <root>'
CALL 'public final fun fold <T, R> (initial: R of kotlin.collections.CollectionsKt.fold, operation: kotlin.Function2<@[ParameterName(name = 'acc')] R of kotlin.collections.CollectionsKt.fold, T of kotlin.collections.CollectionsKt.fold, R of kotlin.collections.CollectionsKt.fold>): R of kotlin.collections.CollectionsKt.fold [inline] declared in kotlin.collections.CollectionsKt' type=T of <root>.sum origin=null
<T>: T of <root>.sum
<R>: T of <root>.sum
$receiver: GET_VAR '<this>: kotlin.collections.List<T of <root>.sum> declared in <root>.sum' type=kotlin.collections.List<T of <root>.sum> origin=null
initial: CALL 'public abstract fun <get-unit> (): T of <root>.Monoid declared in <root>.Monoid' type=T of <root>.sum origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Monoid<T of <root>.sum> declared in <root>.sum' type=<root>.Monoid<T of <root>.sum> origin=null
operation: FUN_EXPR type=kotlin.Function2<@[ParameterName(name = 'acc')] T of <root>.sum, T of <root>.sum, T of <root>.sum> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (acc:T of <root>.sum, e:T of <root>.sum) returnType:T of <root>.sum
VALUE_PARAMETER name:acc index:0 type:T of <root>.sum
VALUE_PARAMETER name:e index:1 type:T of <root>.sum
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (acc: T of <root>.sum, e: T of <root>.sum): T of <root>.sum declared in <root>.sum'
CALL 'public abstract fun combine (other: T of <root>.Monoid): T of <root>.Monoid [fake_override,infix] declared in <root>.Monoid' type=T of <root>.sum origin=null
$this: GET_VAR '<this>: <root>.Monoid<T of <root>.sum> declared in <root>.sum' type=<root>.Monoid<T of <root>.sum> origin=null
$receiver: GET_VAR 'acc: T of <root>.sum declared in <root>.sum.<anonymous>' type=T of <root>.sum origin=null
other: GET_VAR 'e: T of <root>.sum declared in <root>.sum.<anonymous>' type=T of <root>.sum origin=null
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Int origin=null
<T>: <root>.IntMonoid
<R>: kotlin.Int
receiver: GET_OBJECT 'CLASS OBJECT name:IntMonoid modality:FINAL visibility:public superTypes:[<root>.Monoid<kotlin.Int>]' type=<root>.IntMonoid
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<<root>.IntMonoid, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.IntMonoid) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:$this$with type:<root>.IntMonoid
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.box'
CALL 'public final fun sum <T> (<this>: <root>.Monoid<T of <root>.sum>): T of <root>.sum declared in <root>' type=kotlin.Int origin=null
<T>: kotlin.Int
$receiver: CALL 'public final fun listOf <T> (vararg elements: T of kotlin.collections.CollectionsKt.listOf): kotlin.collections.List<T of kotlin.collections.CollectionsKt.listOf> declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<kotlin.Int> origin=null
<T>: kotlin.Int
elements: VARARG type=kotlin.Array<out kotlin.Int> varargElementType=kotlin.Int
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CONST Int type=kotlin.Int value=3
<this>: GET_VAR '$this$with: <root>.IntMonoid declared in <root>.box.<anonymous>' type=<root>.IntMonoid origin=null
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.String origin=null
<T>: <root>.StringMonoid
<R>: kotlin.String
receiver: GET_OBJECT 'CLASS OBJECT name:StringMonoid modality:FINAL visibility:public superTypes:[<root>.Monoid<kotlin.String>]' type=<root>.StringMonoid
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<<root>.StringMonoid, kotlin.String> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.StringMonoid) returnType:kotlin.String
$receiver: VALUE_PARAMETER name:$this$with type:<root>.StringMonoid
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.box'
CALL 'public final fun sum <T> (<this>: <root>.Monoid<T of <root>.sum>): T of <root>.sum declared in <root>' type=kotlin.String origin=null
<T>: kotlin.String
$receiver: CALL 'public final fun listOf <T> (vararg elements: T of kotlin.collections.CollectionsKt.listOf): kotlin.collections.List<T of kotlin.collections.CollectionsKt.listOf> declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<kotlin.String> origin=null
<T>: kotlin.String
elements: VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
CONST String type=kotlin.String value="O"
CONST String type=kotlin.String value="K"
<this>: GET_VAR '$this$with: <root>.StringMonoid declared in <root>.box.<anonymous>' type=<root>.StringMonoid origin=null
@@ -1,51 +0,0 @@
FILE fqName:<root> fileName:/function.kt
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:c visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=42
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-c> visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Int
correspondingProperty: PROPERTY name:c visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-c> (): kotlin.Int declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-c>' type=<root>.C origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:foo visibility:public modality:FINAL <> (_context_receiver_0:<root>.C) returnType:kotlin.Unit
contextReceiverParametersCount: 1
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '_context_receiver_0: <root>.C declared in <root>.foo' type=<root>.C origin=null
FUN name:bar visibility:public modality:FINAL <> (c:<root>.C) returnType:kotlin.Unit
VALUE_PARAMETER name:c index:0 type:<root>.C
BLOCK_BODY
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Unit origin=null
<T>: <root>.C
<R>: kotlin.Unit
receiver: GET_VAR 'c: <root>.C declared in <root>.bar' type=<root>.C origin=null
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<<root>.C, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.C) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:<root>.C
BLOCK_BODY
CALL 'public final fun foo (_context_receiver_0: <root>.C): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.C declared in <root>.bar.<anonymous>' type=<root>.C origin=null
@@ -1,23 +0,0 @@
class C {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val c: Int
field = 42
get
}
fun foo(_context_receiver_0: C) {
_context_receiver_0.<get-c>() /*~> Unit */
}
fun bar(c: C) {
with<C, Unit>(receiver = c, block = local fun C.<anonymous>() {
foo(_context_receiver_0 = $this$with)
}
)
}
@@ -29,13 +29,13 @@ FILE fqName:<root> fileName:/function.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:foo visibility:public modality:FINAL <> (<this>:<root>.C) returnType:kotlin.Unit
FUN name:foo visibility:public modality:FINAL <> (_context_receiver_0:<root>.C) returnType:kotlin.Unit
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.foo' type=<root>.C origin=null
$this: GET_VAR '_context_receiver_0: <root>.C declared in <root>.foo' type=<root>.C origin=null
FUN name:bar visibility:public modality:FINAL <> (c:<root>.C) returnType:kotlin.Unit
VALUE_PARAMETER name:c index:0 type:<root>.C
BLOCK_BODY
@@ -47,5 +47,5 @@ FILE fqName:<root> fileName:/function.kt
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.C) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:<root>.C
BLOCK_BODY
CALL 'public final fun foo (<this>: <root>.C): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<this>: GET_VAR '$this$with: <root>.C declared in <root>.bar.<anonymous>' type=<root>.C origin=null
CALL 'public final fun foo (_context_receiver_0: <root>.C): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.C declared in <root>.bar.<anonymous>' type=<root>.C origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ContextReceivers
class C {
@@ -11,13 +11,13 @@ class C {
}
fun foo(<this>: C) {
<this>.<get-c>() /*~> Unit */
fun foo(_context_receiver_0: C) {
_context_receiver_0.<get-c>() /*~> Unit */
}
fun bar(c: C) {
with<C, Unit>(receiver = c, block = local fun C.<anonymous>() {
foo(<this> = $this$with)
foo(_context_receiver_0 = $this$with)
}
)
}
@@ -1,50 +0,0 @@
FILE fqName:<root> fileName:/function.kt
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:c visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=42
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-c> visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Int
correspondingProperty: PROPERTY name:c visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-c> (): kotlin.Int declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-c>' type=<root>.C origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:foo visibility:public modality:FINAL <> (<this>:<root>.C) returnType:kotlin.Unit
VALUE_PARAMETER name:<this> index:0 type:<root>.C
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.foo' type=<root>.C origin=null
FUN name:bar visibility:public modality:FINAL <> (c:<root>.C) returnType:kotlin.Unit
VALUE_PARAMETER name:c index:0 type:<root>.C
BLOCK_BODY
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Unit origin=null
<T>: <root>.C
<R>: kotlin.Unit
receiver: GET_VAR 'c: <root>.C declared in <root>.bar' type=<root>.C origin=null
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<<root>.C, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.C) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:<root>.C
BLOCK_BODY
CALL 'public final fun foo (<this>: <root>.C): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<this>: GET_VAR '$this$with: <root>.C declared in <root>.bar.<anonymous>' type=<root>.C origin=null
@@ -78,52 +78,52 @@ FILE fqName:<root> fileName:/functionalType.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:f1 visibility:public modality:FINAL <> ($receiver:<root>.R, <this>:<root>.C, g:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit>) returnType:kotlin.Unit
FUN name:f1 visibility:public modality:FINAL <> ($receiver:<root>.R, _context_receiver_0:<root>.C, g:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit>) returnType:kotlin.Unit
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.R
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
VALUE_PARAMETER name:g index:1 type:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit>
BLOCK_BODY
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function3, p2: P2 of kotlin.Function3, p3: P3 of kotlin.Function3): R of kotlin.Function3 [operator] declared in kotlin.Function3' type=kotlin.Unit origin=INVOKE
$this: GET_VAR 'g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit> declared in <root>.f1' type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit> origin=VARIABLE_AS_FUNCTION
p1: GET_VAR '<this>: <root>.C declared in <root>.f1' type=<root>.C origin=null
p1: GET_VAR '_context_receiver_0: <root>.C declared in <root>.f1' type=<root>.C origin=null
p2: GET_VAR '<this>: <root>.R declared in <root>.f1' type=<root>.R origin=null
p3: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Param' type=<root>.Param origin=null
FUN name:f2 visibility:public modality:FINAL <> (<this>:<root>.C, g:@[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit>) returnType:kotlin.Unit
FUN name:f2 visibility:public modality:FINAL <> (_context_receiver_0:<root>.C, g:@[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit>) returnType:kotlin.Unit
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
VALUE_PARAMETER name:g index:1 type:@[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit>
BLOCK_BODY
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function2, p2: P2 of kotlin.Function2): R of kotlin.Function2 [operator] declared in kotlin.Function2' type=kotlin.Unit origin=INVOKE
$this: GET_VAR 'g: @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit> declared in <root>.f2' type=@[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit> origin=VARIABLE_AS_FUNCTION
p1: GET_VAR '<this>: <root>.C declared in <root>.f2' type=<root>.C origin=null
p1: GET_VAR '_context_receiver_0: <root>.C declared in <root>.f2' type=<root>.C origin=null
p2: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Param' type=<root>.Param origin=null
FUN name:f3 visibility:public modality:FINAL <> ($receiver:<root>.R, <this>:<root>.C, g:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit>) returnType:kotlin.Unit
FUN name:f3 visibility:public modality:FINAL <> ($receiver:<root>.R, _context_receiver_0:<root>.C, g:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit>) returnType:kotlin.Unit
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.R
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
VALUE_PARAMETER name:g index:1 type:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit>
BLOCK_BODY
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function2, p2: P2 of kotlin.Function2): R of kotlin.Function2 [operator] declared in kotlin.Function2' type=kotlin.Unit origin=INVOKE
$this: GET_VAR 'g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit> declared in <root>.f3' type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit> origin=VARIABLE_AS_FUNCTION
p1: GET_VAR '<this>: <root>.C declared in <root>.f3' type=<root>.C origin=null
p1: GET_VAR '_context_receiver_0: <root>.C declared in <root>.f3' type=<root>.C origin=null
p2: GET_VAR '<this>: <root>.R declared in <root>.f3' type=<root>.R origin=null
FUN name:f4 visibility:public modality:FINAL <> (<this>:<root>.C, g:@[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit>) returnType:kotlin.Unit
FUN name:f4 visibility:public modality:FINAL <> (_context_receiver_0:<root>.C, g:@[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit>) returnType:kotlin.Unit
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
VALUE_PARAMETER name:g index:1 type:@[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit>
BLOCK_BODY
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE
$this: GET_VAR 'g: @[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit> declared in <root>.f4' type=@[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit> origin=VARIABLE_AS_FUNCTION
p1: GET_VAR '<this>: <root>.C declared in <root>.f4' type=<root>.C origin=null
p1: GET_VAR '_context_receiver_0: <root>.C declared in <root>.f4' type=<root>.C origin=null
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:lf1 type:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit> [val]
FUN_EXPR type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.R, <this>:<root>.C, <anonymous parameter 0>:<root>.Param) returnType:kotlin.Unit
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.R, _context_receiver_0:<root>.C, <anonymous parameter 0>:<root>.Param) returnType:kotlin.Unit
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:$this$null type:<root>.R
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
VALUE_PARAMETER UNDERSCORE_PARAMETER name:<anonymous parameter 0> index:1 type:<root>.Param
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
@@ -131,39 +131,39 @@ FILE fqName:<root> fileName:/functionalType.kt
$this: GET_VAR '$this$null: <root>.R declared in <root>.test.<anonymous>' type=<root>.R origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
$this: GET_VAR '_context_receiver_0: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
VAR name:lf2 type:@[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit> [val]
FUN_EXPR type=@[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (<this>:<root>.C, <anonymous parameter 0>:<root>.Param) returnType:kotlin.Unit
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (_context_receiver_0:<root>.C, <anonymous parameter 0>:<root>.Param) returnType:kotlin.Unit
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
VALUE_PARAMETER UNDERSCORE_PARAMETER name:<anonymous parameter 0> index:1 type:<root>.Param
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
$this: GET_VAR '_context_receiver_0: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
VAR name:lf3 type:@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit> [val]
FUN_EXPR type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.R, <this>:<root>.C) returnType:kotlin.Unit
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.R, _context_receiver_0:<root>.C) returnType:kotlin.Unit
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:$this$null type:<root>.R
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-r> (): kotlin.Int declared in <root>.R' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '$this$null: <root>.R declared in <root>.test.<anonymous>' type=<root>.R origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
$this: GET_VAR '_context_receiver_0: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
VAR name:lf4 type:@[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit> [val]
FUN_EXPR type=@[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (<this>:<root>.C) returnType:kotlin.Unit
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (_context_receiver_0:<root>.C) returnType:kotlin.Unit
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
$this: GET_VAR '_context_receiver_0: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Unit origin=null
<T>: <root>.C
<R>: kotlin.Unit
@@ -180,18 +180,18 @@ FILE fqName:<root> fileName:/functionalType.kt
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.R) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:<root>.R
BLOCK_BODY
CALL 'public final fun f1 (<this>: <root>.C, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
CALL 'public final fun f1 (_context_receiver_0: <root>.C, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
$receiver: GET_VAR '$this$with: <root>.R declared in <root>.test.<anonymous>.<anonymous>' type=<root>.R origin=null
<this>: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
g: GET_VAR 'val lf1: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit> [val] declared in <root>.test' type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit> origin=null
CALL 'public final fun f1 (<this>: <root>.C, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
CALL 'public final fun f1 (_context_receiver_0: <root>.C, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
$receiver: GET_VAR '$this$with: <root>.R declared in <root>.test.<anonymous>.<anonymous>' type=<root>.R origin=null
<this>: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
g: FUN_EXPR type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function3<<root>.C, <root>.R, <root>.Param, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.R, <this>:<root>.C, <anonymous parameter 0>:<root>.Param) returnType:kotlin.Unit
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.R, _context_receiver_0:<root>.C, <anonymous parameter 0>:<root>.Param) returnType:kotlin.Unit
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:$this$f1 type:<root>.R
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
VALUE_PARAMETER UNDERSCORE_PARAMETER name:<anonymous parameter 0> index:1 type:<root>.Param
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
@@ -200,32 +200,32 @@ FILE fqName:<root> fileName:/functionalType.kt
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
CALL 'public final fun f2 (<this>: <root>.C, g: @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<this>: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
CALL 'public final fun f2 (_context_receiver_0: <root>.C, g: @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
g: GET_VAR 'val lf2: @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit> [val] declared in <root>.test' type=@[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit> origin=null
CALL 'public final fun f2 (<this>: <root>.C, g: @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<this>: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
CALL 'public final fun f2 (_context_receiver_0: <root>.C, g: @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
g: FUN_EXPR type=@[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.Param, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (<this>:<root>.C, <anonymous parameter 0>:<root>.Param) returnType:kotlin.Unit
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (_context_receiver_0:<root>.C, <anonymous parameter 0>:<root>.Param) returnType:kotlin.Unit
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
VALUE_PARAMETER UNDERSCORE_PARAMETER name:<anonymous parameter 0> index:1 type:<root>.Param
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
CALL 'public final fun f3 (<this>: <root>.C, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
CALL 'public final fun f3 (_context_receiver_0: <root>.C, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
$receiver: GET_VAR '$this$with: <root>.R declared in <root>.test.<anonymous>.<anonymous>' type=<root>.R origin=null
<this>: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
g: GET_VAR 'val lf3: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit> [val] declared in <root>.test' type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit> origin=null
CALL 'public final fun f3 (<this>: <root>.C, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
CALL 'public final fun f3 (_context_receiver_0: <root>.C, g: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
$receiver: GET_VAR '$this$with: <root>.R declared in <root>.test.<anonymous>.<anonymous>' type=<root>.R origin=null
<this>: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
g: FUN_EXPR type=@[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<<root>.C, <root>.R, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.R, <this>:<root>.C) returnType:kotlin.Unit
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.R, _context_receiver_0:<root>.C) returnType:kotlin.Unit
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:$this$f3 type:<root>.R
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-r> (): kotlin.Int declared in <root>.R' type=kotlin.Int origin=GET_PROPERTY
@@ -233,15 +233,15 @@ FILE fqName:<root> fileName:/functionalType.kt
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
CALL 'public final fun f4 (<this>: <root>.C, g: @[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<this>: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
CALL 'public final fun f4 (_context_receiver_0: <root>.C, g: @[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
g: GET_VAR 'val lf4: @[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit> [val] declared in <root>.test' type=@[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit> origin=null
CALL 'public final fun f4 (<this>: <root>.C, g: @[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<this>: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
CALL 'public final fun f4 (_context_receiver_0: <root>.C, g: @[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.C declared in <root>.test.<anonymous>' type=<root>.C origin=null
g: FUN_EXPR type=@[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (<this>:<root>.C) returnType:kotlin.Unit
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (_context_receiver_0:<root>.C) returnType:kotlin.Unit
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
@@ -33,62 +33,62 @@ class R {
}
fun R.f1(<this>: C, g: @ExtensionFunctionType @ContextFunctionTypeParams(count = 1) Function3<C, R, Param, Unit>) {
g.invoke(p1 = <this>, p2 = <this>, p3 = Param())
fun R.f1(_context_receiver_0: C, g: @ExtensionFunctionType @ContextFunctionTypeParams(count = 1) Function3<C, R, Param, Unit>) {
g.invoke(p1 = _context_receiver_0, p2 = <this>, p3 = Param())
}
fun f2(<this>: C, g: @ContextFunctionTypeParams(count = 1) Function2<C, Param, Unit>) {
g.invoke(p1 = <this>, p2 = Param())
fun f2(_context_receiver_0: C, g: @ContextFunctionTypeParams(count = 1) Function2<C, Param, Unit>) {
g.invoke(p1 = _context_receiver_0, p2 = Param())
}
fun R.f3(<this>: C, g: @ExtensionFunctionType @ContextFunctionTypeParams(count = 1) Function2<C, R, Unit>) {
g.invoke(p1 = <this>, p2 = <this>)
fun R.f3(_context_receiver_0: C, g: @ExtensionFunctionType @ContextFunctionTypeParams(count = 1) Function2<C, R, Unit>) {
g.invoke(p1 = _context_receiver_0, p2 = <this>)
}
fun f4(<this>: C, g: @ContextFunctionTypeParams(count = 1) Function1<C, Unit>) {
g.invoke(p1 = <this>)
fun f4(_context_receiver_0: C, g: @ContextFunctionTypeParams(count = 1) Function1<C, Unit>) {
g.invoke(p1 = _context_receiver_0)
}
fun test() {
val lf1: @ExtensionFunctionType @ContextFunctionTypeParams(count = 1) Function3<C, R, Param, Unit> = local fun R.<anonymous>(<this>: C, <anonymous parameter 0>: Param) {
val lf1: @ExtensionFunctionType @ContextFunctionTypeParams(count = 1) Function3<C, R, Param, Unit> = local fun R.<anonymous>(_context_receiver_0: C, <anonymous parameter 0>: Param) {
$this$null.<get-r>() /*~> Unit */
<this>.<get-c>() /*~> Unit */
_context_receiver_0.<get-c>() /*~> Unit */
}
val lf2: @ContextFunctionTypeParams(count = 1) Function2<C, Param, Unit> = local fun <anonymous>(<this>: C, <anonymous parameter 0>: Param) {
<this>.<get-c>() /*~> Unit */
val lf2: @ContextFunctionTypeParams(count = 1) Function2<C, Param, Unit> = local fun <anonymous>(_context_receiver_0: C, <anonymous parameter 0>: Param) {
_context_receiver_0.<get-c>() /*~> Unit */
}
val lf3: @ExtensionFunctionType @ContextFunctionTypeParams(count = 1) Function2<C, R, Unit> = local fun R.<anonymous>(<this>: C) {
val lf3: @ExtensionFunctionType @ContextFunctionTypeParams(count = 1) Function2<C, R, Unit> = local fun R.<anonymous>(_context_receiver_0: C) {
$this$null.<get-r>() /*~> Unit */
<this>.<get-c>() /*~> Unit */
_context_receiver_0.<get-c>() /*~> Unit */
}
val lf4: @ContextFunctionTypeParams(count = 1) Function1<C, Unit> = local fun <anonymous>(<this>: C) {
<this>.<get-c>() /*~> Unit */
val lf4: @ContextFunctionTypeParams(count = 1) Function1<C, Unit> = local fun <anonymous>(_context_receiver_0: C) {
_context_receiver_0.<get-c>() /*~> Unit */
}
with<C, Unit>(receiver = C(), block = local fun C.<anonymous>() {
with<R, Unit>(receiver = R(), block = local fun R.<anonymous>() {
$this$with.f1(<this> = $this$with, g = lf1)
$this$with.f1(<this> = $this$with, g = local fun R.<anonymous>(<this>: C, <anonymous parameter 0>: Param) {
$this$with.f1(_context_receiver_0 = $this$with, g = lf1)
$this$with.f1(_context_receiver_0 = $this$with, g = local fun R.<anonymous>(_context_receiver_0: C, <anonymous parameter 0>: Param) {
$this$f1.<get-r>() /*~> Unit */
$this$with.<get-c>() /*~> Unit */
}
)
f2(<this> = $this$with, g = lf2)
f2(<this> = $this$with, g = local fun <anonymous>(<this>: C, <anonymous parameter 0>: Param) {
f2(_context_receiver_0 = $this$with, g = lf2)
f2(_context_receiver_0 = $this$with, g = local fun <anonymous>(_context_receiver_0: C, <anonymous parameter 0>: Param) {
$this$with.<get-c>() /*~> Unit */
}
)
$this$with.f3(<this> = $this$with, g = lf3)
$this$with.f3(<this> = $this$with, g = local fun R.<anonymous>(<this>: C) {
$this$with.f3(_context_receiver_0 = $this$with, g = lf3)
$this$with.f3(_context_receiver_0 = $this$with, g = local fun R.<anonymous>(_context_receiver_0: C) {
$this$f3.<get-r>() /*~> Unit */
$this$with.<get-c>() /*~> Unit */
}
)
f4(<this> = $this$with, g = lf4)
f4(<this> = $this$with, g = local fun <anonymous>(<this>: C) {
f4(_context_receiver_0 = $this$with, g = lf4)
f4(_context_receiver_0 = $this$with, g = local fun <anonymous>(_context_receiver_0: C) {
$this$with.<get-c>() /*~> Unit */
}
)
@@ -257,16 +257,16 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
overridden:
public open fun toString (): kotlin.String [fake_override] declared in kotlin.collections.Iterator
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:iterator visibility:public modality:FINAL <> ($receiver:<root>.Counter, <this>:<root>.CounterConfig) returnType:<root>.CounterIterator [operator]
FUN name:iterator visibility:public modality:FINAL <> ($receiver:<root>.Counter, _context_receiver_0:<root>.CounterConfig) returnType:<root>.CounterIterator [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Counter
VALUE_PARAMETER name:<this> index:0 type:<root>.CounterConfig
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun iterator (<this>: <root>.CounterConfig): <root>.CounterIterator [operator] declared in <root>'
RETURN type=kotlin.Nothing from='public final fun iterator (_context_receiver_0: <root>.CounterConfig): <root>.CounterIterator [operator] declared in <root>'
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=<root>.CounterIterator origin=null
<T>: <root>.CounterConfig
<R>: <root>.CounterIterator
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.iterator' type=<root>.CounterConfig origin=null
receiver: GET_VAR '_context_receiver_0: <root>.CounterConfig declared in <root>.iterator' type=<root>.CounterConfig origin=null
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<<root>.CounterConfig, <root>.CounterIterator> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.CounterConfig) returnType:<root>.CounterIterator
$receiver: VALUE_PARAMETER name:$this$with type:<root>.CounterConfig
@@ -289,9 +289,9 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
BLOCK_BODY
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_4 type:<root>.CounterIterator [val]
CALL 'public final fun iterator (<this>: <root>.CounterConfig): <root>.CounterIterator [operator] declared in <root>' type=<root>.CounterIterator origin=FOR_LOOP_ITERATOR
CALL 'public final fun iterator (_context_receiver_0: <root>.CounterConfig): <root>.CounterIterator [operator] declared in <root>' type=<root>.CounterIterator origin=FOR_LOOP_ITERATOR
$receiver: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Counter' type=<root>.Counter origin=null
<this>: GET_VAR '$this$with: <root>.CounterConfig declared in <root>.box.<anonymous>' type=<root>.CounterConfig origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.CounterConfig declared in <root>.box.<anonymous>' type=<root>.CounterConfig origin=null
WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'public open fun hasNext (): kotlin.Boolean [operator] declared in <root>.CounterIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
$this: GET_VAR 'val tmp_4: <root>.CounterIterator [val] declared in <root>.box.<anonymous>' type=<root>.CounterIterator origin=null
@@ -115,8 +115,8 @@ class CounterIterator : Iterator<Int> {
}
operator fun Counter.iterator(<this>: CounterConfig): CounterIterator {
return with<CounterConfig, CounterIterator>(receiver = <this>, block = local fun CounterConfig.<anonymous>(): CounterIterator {
operator fun Counter.iterator(_context_receiver_0: CounterConfig): CounterIterator {
return with<CounterConfig, CounterIterator>(receiver = _context_receiver_0, block = local fun CounterConfig.<anonymous>(): CounterIterator {
return CounterIterator(<this> = $this$with, counter = <this>)
}
)
@@ -126,7 +126,7 @@ fun box(): String {
var result: Int = 0
with<CounterConfig, Unit>(receiver = CounterConfig(), block = local fun CounterConfig.<anonymous>() {
{ // BLOCK
val tmp0_iterator: CounterIterator = Counter().iterator(<this> = $this$with)
val tmp0_iterator: CounterIterator = Counter().iterator(_context_receiver_0 = $this$with)
while (tmp0_iterator.hasNext()) { // BLOCK
val i: Int = tmp0_iterator.next()
{ // BLOCK
@@ -15,22 +15,22 @@ FILE fqName:<root> fileName:/lazy.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:test1 visibility:public modality:FINAL <> (<this>:<root>.Lazy<kotlin.Int>, <this>:<root>.Lazy<kotlin.CharSequence>) returnType:kotlin.Unit
FUN name:test1 visibility:public modality:FINAL <> (_context_receiver_0:<root>.Lazy<kotlin.Int>, _context_receiver_1:<root>.Lazy<kotlin.CharSequence>) returnType:kotlin.Unit
contextReceiverParametersCount: 2
VALUE_PARAMETER name:<this> index:0 type:<root>.Lazy<kotlin.Int>
VALUE_PARAMETER name:<this> index:1 type:<root>.Lazy<kotlin.CharSequence>
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Lazy<kotlin.Int>
VALUE_PARAMETER name:_context_receiver_1 index:1 type:<root>.Lazy<kotlin.CharSequence>
BLOCK_BODY
FUN name:test2 visibility:public modality:FINAL <T> ($receiver:<root>.Lazy<kotlin.Int>, <this>:<root>.Lazy<T of <root>.test2>) returnType:kotlin.Unit
FUN name:test2 visibility:public modality:FINAL <T> ($receiver:<root>.Lazy<kotlin.Int>, _context_receiver_0:<root>.Lazy<T of <root>.test2>) returnType:kotlin.Unit
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Lazy<kotlin.Int>
VALUE_PARAMETER name:<this> index:0 type:<root>.Lazy<T of <root>.test2>
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Lazy<T of <root>.test2>
BLOCK_BODY
FUN name:test3 visibility:public modality:FINAL <T> ($receiver:<root>.Lazy<kotlin.Int>, <this>:<root>.Lazy<<root>.Lazy<T of <root>.test3>>) returnType:kotlin.Unit
FUN name:test3 visibility:public modality:FINAL <T> ($receiver:<root>.Lazy<kotlin.Int>, _context_receiver_0:<root>.Lazy<<root>.Lazy<T of <root>.test3>>) returnType:kotlin.Unit
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Lazy<kotlin.Int>
VALUE_PARAMETER name:<this> index:0 type:<root>.Lazy<<root>.Lazy<T of <root>.test3>>
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Lazy<<root>.Lazy<T of <root>.test3>>
BLOCK_BODY
FUN name:f visibility:public modality:FINAL <T> (lazy1:<root>.Lazy<kotlin.Int>, lazy2:<root>.Lazy<kotlin.CharSequence>, lazyT:<root>.Lazy<T of <root>.f>, lazyLazyT:<root>.Lazy<<root>.Lazy<T of <root>.f>>) returnType:kotlin.Unit
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
@@ -55,13 +55,13 @@ FILE fqName:<root> fileName:/lazy.kt
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.Lazy<kotlin.CharSequence>) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:<root>.Lazy<kotlin.CharSequence>
BLOCK_BODY
CALL 'public final fun test1 (<this>: <root>.Lazy<kotlin.Int>, <this>: <root>.Lazy<kotlin.CharSequence>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<this>: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
<this>: GET_VAR '$this$with: <root>.Lazy<kotlin.CharSequence> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.CharSequence> origin=null
CALL 'public final fun test2 <T> (<this>: <root>.Lazy<T of <root>.test2>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
CALL 'public final fun test1 (_context_receiver_0: <root>.Lazy<kotlin.Int>, _context_receiver_1: <root>.Lazy<kotlin.CharSequence>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
_context_receiver_1: GET_VAR '$this$with: <root>.Lazy<kotlin.CharSequence> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.CharSequence> origin=null
CALL 'public final fun test2 <T> (_context_receiver_0: <root>.Lazy<T of <root>.test2>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<T>: kotlin.CharSequence
$receiver: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
<this>: GET_VAR '$this$with: <root>.Lazy<kotlin.CharSequence> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.CharSequence> origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Lazy<kotlin.CharSequence> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.CharSequence> origin=null
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Unit origin=null
<T>: <root>.Lazy<kotlin.CharSequence>
<R>: kotlin.Unit
@@ -78,13 +78,13 @@ FILE fqName:<root> fileName:/lazy.kt
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.Lazy<kotlin.Int>) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:<root>.Lazy<kotlin.Int>
BLOCK_BODY
CALL 'public final fun test1 (<this>: <root>.Lazy<kotlin.Int>, <this>: <root>.Lazy<kotlin.CharSequence>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<this>: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
<this>: GET_VAR '$this$with: <root>.Lazy<kotlin.CharSequence> declared in <root>.f.<anonymous>' type=<root>.Lazy<kotlin.CharSequence> origin=null
CALL 'public final fun test2 <T> (<this>: <root>.Lazy<T of <root>.test2>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
CALL 'public final fun test1 (_context_receiver_0: <root>.Lazy<kotlin.Int>, _context_receiver_1: <root>.Lazy<kotlin.CharSequence>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
_context_receiver_1: GET_VAR '$this$with: <root>.Lazy<kotlin.CharSequence> declared in <root>.f.<anonymous>' type=<root>.Lazy<kotlin.CharSequence> origin=null
CALL 'public final fun test2 <T> (_context_receiver_0: <root>.Lazy<T of <root>.test2>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<T>: kotlin.Int
$receiver: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
<this>: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Unit origin=null
<T>: <root>.Lazy<T of <root>.f>
<R>: kotlin.Unit
@@ -101,10 +101,10 @@ FILE fqName:<root> fileName:/lazy.kt
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.Lazy<kotlin.Int>) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:<root>.Lazy<kotlin.Int>
BLOCK_BODY
CALL 'public final fun test2 <T> (<this>: <root>.Lazy<T of <root>.test2>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
CALL 'public final fun test2 <T> (_context_receiver_0: <root>.Lazy<T of <root>.test2>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<T>: kotlin.Int
$receiver: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
<this>: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Unit origin=null
<T>: <root>.Lazy<<root>.Lazy<T of <root>.f>>
<R>: kotlin.Unit
@@ -121,14 +121,14 @@ FILE fqName:<root> fileName:/lazy.kt
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.Lazy<kotlin.Int>) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:<root>.Lazy<kotlin.Int>
BLOCK_BODY
CALL 'public final fun test2 <T> (<this>: <root>.Lazy<T of <root>.test2>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
CALL 'public final fun test2 <T> (_context_receiver_0: <root>.Lazy<T of <root>.test2>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<T>: kotlin.Int
$receiver: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
<this>: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
CALL 'public final fun test3 <T> (<this>: <root>.Lazy<<root>.Lazy<T of <root>.test3>>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
CALL 'public final fun test3 <T> (_context_receiver_0: <root>.Lazy<<root>.Lazy<T of <root>.test3>>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<T>: T of <root>.f
$receiver: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
<this>: GET_VAR '$this$with: <root>.Lazy<<root>.Lazy<T of <root>.f>> declared in <root>.f.<anonymous>' type=<root>.Lazy<<root>.Lazy<T of <root>.f>> origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Lazy<<root>.Lazy<T of <root>.f>> declared in <root>.f.<anonymous>' type=<root>.Lazy<<root>.Lazy<T of <root>.f>> origin=null
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Unit origin=null
<T>: <root>.Lazy<kotlin.Int>
<R>: kotlin.Unit
@@ -145,11 +145,11 @@ FILE fqName:<root> fileName:/lazy.kt
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.Lazy<<root>.Lazy<T of <root>.f>>) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:<root>.Lazy<<root>.Lazy<T of <root>.f>>
BLOCK_BODY
CALL 'public final fun test2 <T> (<this>: <root>.Lazy<T of <root>.test2>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
CALL 'public final fun test2 <T> (_context_receiver_0: <root>.Lazy<T of <root>.test2>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<T>: <root>.Lazy<T of <root>.f>
$receiver: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
<this>: GET_VAR '$this$with: <root>.Lazy<<root>.Lazy<T of <root>.f>> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<<root>.Lazy<T of <root>.f>> origin=null
CALL 'public final fun test3 <T> (<this>: <root>.Lazy<<root>.Lazy<T of <root>.test3>>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Lazy<<root>.Lazy<T of <root>.f>> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<<root>.Lazy<T of <root>.f>> origin=null
CALL 'public final fun test3 <T> (_context_receiver_0: <root>.Lazy<<root>.Lazy<T of <root>.test3>>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<T>: T of <root>.f
$receiver: GET_VAR '$this$with: <root>.Lazy<kotlin.Int> declared in <root>.f.<anonymous>' type=<root>.Lazy<kotlin.Int> origin=null
<this>: GET_VAR '$this$with: <root>.Lazy<<root>.Lazy<T of <root>.f>> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<<root>.Lazy<T of <root>.f>> origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Lazy<<root>.Lazy<T of <root>.f>> declared in <root>.f.<anonymous>.<anonymous>' type=<root>.Lazy<<root>.Lazy<T of <root>.f>> origin=null
@@ -2,51 +2,51 @@ interface Lazy<T : Any?> {
}
fun test1(<this>: Lazy<Int>, <this>: Lazy<CharSequence>) {
fun test1(_context_receiver_0: Lazy<Int>, _context_receiver_1: Lazy<CharSequence>) {
}
fun <T : Any?> Lazy<Int>.test2(<this>: Lazy<T>) {
fun <T : Any?> Lazy<Int>.test2(_context_receiver_0: Lazy<T>) {
}
fun <T : Any?> Lazy<Int>.test3(<this>: Lazy<Lazy<T>>) {
fun <T : Any?> Lazy<Int>.test3(_context_receiver_0: Lazy<Lazy<T>>) {
}
fun <T : Any?> f(lazy1: Lazy<Int>, lazy2: Lazy<CharSequence>, lazyT: Lazy<T>, lazyLazyT: Lazy<Lazy<T>>) {
with<Lazy<Int>, Unit>(receiver = lazy1, block = local fun Lazy<Int>.<anonymous>() {
with<Lazy<CharSequence>, Unit>(receiver = lazy2, block = local fun Lazy<CharSequence>.<anonymous>() {
test1(<this> = $this$with, <this> = $this$with)
$this$with.test2<CharSequence>(<this> = $this$with)
test1(_context_receiver_0 = $this$with, _context_receiver_1 = $this$with)
$this$with.test2<CharSequence>(_context_receiver_0 = $this$with)
}
)
}
)
with<Lazy<CharSequence>, Unit>(receiver = lazy2, block = local fun Lazy<CharSequence>.<anonymous>() {
with<Lazy<Int>, Unit>(receiver = lazy1, block = local fun Lazy<Int>.<anonymous>() {
test1(<this> = $this$with, <this> = $this$with)
$this$with.test2<Int>(<this> = $this$with)
test1(_context_receiver_0 = $this$with, _context_receiver_1 = $this$with)
$this$with.test2<Int>(_context_receiver_0 = $this$with)
}
)
}
)
with<Lazy<T>, Unit>(receiver = lazyT, block = local fun Lazy<T>.<anonymous>() {
with<Lazy<Int>, Unit>(receiver = lazy1, block = local fun Lazy<Int>.<anonymous>() {
$this$with.test2<Int>(<this> = $this$with)
$this$with.test2<Int>(_context_receiver_0 = $this$with)
}
)
}
)
with<Lazy<Lazy<T>>, Unit>(receiver = lazyLazyT, block = local fun Lazy<Lazy<T>>.<anonymous>() {
with<Lazy<Int>, Unit>(receiver = lazy1, block = local fun Lazy<Int>.<anonymous>() {
$this$with.test2<Int>(<this> = $this$with)
$this$with.test3<T>(<this> = $this$with)
$this$with.test2<Int>(_context_receiver_0 = $this$with)
$this$with.test3<T>(_context_receiver_0 = $this$with)
}
)
}
)
with<Lazy<Int>, Unit>(receiver = lazy1, block = local fun Lazy<Int>.<anonymous>() {
with<Lazy<Lazy<T>>, Unit>(receiver = lazyLazyT, block = local fun Lazy<Lazy<T>>.<anonymous>() {
$this$with.test2<Lazy<T>>(<this> = $this$with)
$this$with.test3<T>(<this> = $this$with)
$this$with.test2<Lazy<T>>(_context_receiver_0 = $this$with)
$this$with.test3<T>(_context_receiver_0 = $this$with)
}
)
}
@@ -1,45 +0,0 @@
FILE fqName:<root> fileName:/overloadPriority.kt
CLASS CLASS name:Context modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Context
CONSTRUCTOR visibility:public <> () returnType:<root>.Context [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Context modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:f visibility:public modality:FINAL <> (_context_receiver_0:<root>.Context) returnType:kotlin.String
contextReceiverParametersCount: 1
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun f (_context_receiver_0: <root>.Context): kotlin.String declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
FUN name:f visibility:public modality:FINAL <> () returnType:kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun f (): kotlin.Any declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Int origin=null
<T>: <root>.Context
<R>: kotlin.Int
receiver: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Context' type=<root>.Context origin=null
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<<root>.Context, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.Context) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:$this$with type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test'
CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
$this: CALL 'public final fun f (_context_receiver_0: <root>.Context): kotlin.String declared in <root>' type=kotlin.String origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Context declared in <root>.test.<anonymous>' type=<root>.Context origin=null
@@ -1,23 +0,0 @@
class Context {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
fun f(_context_receiver_0: Context): String {
return TODO()
}
fun f(): Any {
return TODO()
}
fun test() {
with<Context, Int>(receiver = Context(), block = local fun Context.<anonymous>(): Int {
return f(_context_receiver_0 = $this$with).<get-length>()
}
) /*~> Unit */
}
@@ -18,11 +18,11 @@ FILE fqName:<root> fileName:/overloadPriority.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:f visibility:public modality:FINAL <> (<this>:<root>.Context) returnType:kotlin.String
FUN name:f visibility:public modality:FINAL <> (_context_receiver_0:<root>.Context) returnType:kotlin.String
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.Context
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun f (<this>: <root>.Context): kotlin.String declared in <root>'
RETURN type=kotlin.Nothing from='public final fun f (_context_receiver_0: <root>.Context): kotlin.String declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
FUN name:f visibility:public modality:FINAL <> () returnType:kotlin.Any
BLOCK_BODY
@@ -41,5 +41,5 @@ FILE fqName:<root> fileName:/overloadPriority.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test'
CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
$this: CALL 'public final fun f (<this>: <root>.Context): kotlin.String declared in <root>' type=kotlin.String origin=null
<this>: GET_VAR '$this$with: <root>.Context declared in <root>.test.<anonymous>' type=<root>.Context origin=null
$this: CALL 'public final fun f (_context_receiver_0: <root>.Context): kotlin.String declared in <root>' type=kotlin.String origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.Context declared in <root>.test.<anonymous>' type=<root>.Context origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ContextReceivers
class Context
@@ -7,7 +7,7 @@ class Context {
}
fun f(<this>: Context): String {
fun f(_context_receiver_0: Context): String {
return TODO()
}
@@ -17,7 +17,7 @@ fun f(): Any {
fun test() {
with<Context, Int>(receiver = Context(), block = local fun Context.<anonymous>(): Int {
return f(<this> = $this$with).<get-length>()
return f(_context_receiver_0 = $this$with).<get-length>()
}
) /*~> Unit */
}
@@ -1,32 +0,0 @@
FILE fqName:<root> fileName:/overloading.kt
FUN name:foo visibility:public modality:FINAL <> (_context_receiver_0:kotlin.Int, _context_receiver_1:kotlin.String) returnType:kotlin.Int
contextReceiverParametersCount: 2
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_1 index:1 type:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (_context_receiver_0: kotlin.Int, _context_receiver_1: kotlin.String): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.foo' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=42
FUN name:foo visibility:public modality:FINAL <> (_context_receiver_0:kotlin.Int) returnType:kotlin.Int
contextReceiverParametersCount: 1
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (_context_receiver_0: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.foo' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=42
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Int origin=null
<T>: kotlin.Int
<R>: kotlin.Int
receiver: CONST Int type=kotlin.Int value=42
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<kotlin.Int, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test'
CALL 'public final fun foo (_context_receiver_0: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.test.<anonymous>' type=kotlin.Int origin=null
@@ -1,14 +0,0 @@
fun foo(_context_receiver_0: Int, _context_receiver_1: String): Int {
return _context_receiver_0.plus(other = 42)
}
fun foo(_context_receiver_0: Int): Int {
return _context_receiver_0.plus(other = 42)
}
fun test() {
with<Int, Int>(receiver = 42, block = local fun Int.<anonymous>(): Int {
return foo(_context_receiver_0 = $this$with)
}
) /*~> Unit */
}
@@ -1,20 +1,20 @@
FILE fqName:<root> fileName:/overloading.kt
FUN name:foo visibility:public modality:FINAL <> (<this>:kotlin.Int, <this>:kotlin.String) returnType:kotlin.Int
FUN name:foo visibility:public modality:FINAL <> (_context_receiver_0:kotlin.Int, _context_receiver_1:kotlin.String) returnType:kotlin.Int
contextReceiverParametersCount: 2
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:<this> index:1 type:kotlin.String
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_1 index:1 type:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (<this>: kotlin.Int, <this>: kotlin.String): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun foo (_context_receiver_0: kotlin.Int, _context_receiver_1: kotlin.String): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.foo' type=kotlin.Int origin=null
$this: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.foo' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=42
FUN name:foo visibility:public modality:FINAL <> (<this>:kotlin.Int) returnType:kotlin.Int
FUN name:foo visibility:public modality:FINAL <> (_context_receiver_0:kotlin.Int) returnType:kotlin.Int
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (<this>: kotlin.Int): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun foo (_context_receiver_0: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.foo' type=kotlin.Int origin=null
$this: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.foo' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=42
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
@@ -28,5 +28,5 @@ FILE fqName:<root> fileName:/overloading.kt
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test'
CALL 'public final fun foo (<this>: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.test.<anonymous>' type=kotlin.Int origin=null
CALL 'public final fun foo (_context_receiver_0: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.test.<anonymous>' type=kotlin.Int origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ContextReceivers
context(Int, String)
@@ -1,14 +1,14 @@
fun foo(<this>: Int, <this>: String): Int {
return <this>.plus(other = 42)
fun foo(_context_receiver_0: Int, _context_receiver_1: String): Int {
return _context_receiver_0.plus(other = 42)
}
fun foo(<this>: Int): Int {
return <this>.plus(other = 42)
fun foo(_context_receiver_0: Int): Int {
return _context_receiver_0.plus(other = 42)
}
fun test() {
with<Int, Int>(receiver = 42, block = local fun Int.<anonymous>(): Int {
return foo(<this> = $this$with)
return foo(_context_receiver_0 = $this$with)
}
) /*~> Unit */
}
@@ -41,10 +41,10 @@ FILE fqName:<root> fileName:/passingLambdaToContextualParam.kt
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
CALL 'public final fun contextual (f: @[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
f: FUN_EXPR type=@[ContextFunctionTypeParams(count = '1')] kotlin.Function1<<root>.C, kotlin.String> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (<this>:<root>.C) returnType:kotlin.String
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (_context_receiver_0:<root>.C) returnType:kotlin.String
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (<this>: <root>.C): kotlin.String declared in <root>.box'
RETURN type=kotlin.Nothing from='local final fun <anonymous> (_context_receiver_0: <root>.C): kotlin.String declared in <root>.box'
CALL 'public final fun <get-result> (): kotlin.String declared in <root>.C' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.box.<anonymous>' type=<root>.C origin=null
$this: GET_VAR '_context_receiver_0: <root>.C declared in <root>.box.<anonymous>' type=<root>.C origin=null
@@ -16,8 +16,8 @@ fun contextual(f: @ContextFunctionTypeParams(count = 1) Function1<C, String>): S
}
fun box(): String {
return contextual(f = local fun <anonymous>(<this>: C): String {
return <this>.<get-result>()
return contextual(f = local fun <anonymous>(_context_receiver_0: C): String {
return _context_receiver_0.<get-result>()
}
)
}
@@ -1,62 +0,0 @@
FILE fqName:<root> fileName:/plusMatrix.kt
CLASS INTERFACE name:NumberOperations modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.NumberOperations
FUN name:plus visibility:public modality:ABSTRACT <> ($this:<root>.NumberOperations, $receiver:kotlin.Number, other:kotlin.Number) returnType:kotlin.Number
$this: VALUE_PARAMETER name:<this> type:<root>.NumberOperations
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Number
VALUE_PARAMETER name:other index:0 type:kotlin.Number
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:Matrix modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Matrix
CONSTRUCTOR visibility:public <> () returnType:<root>.Matrix [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Matrix modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:plus visibility:public modality:FINAL <> ($receiver:<root>.Matrix, _context_receiver_0:<root>.NumberOperations, other:<root>.Matrix) returnType:<root>.Matrix
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Matrix
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.NumberOperations
VALUE_PARAMETER name:other index:1 type:<root>.Matrix
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun plus (_context_receiver_0: <root>.NumberOperations, other: <root>.Matrix): <root>.Matrix declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
FUN name:plusMatrix visibility:public modality:FINAL <> ($receiver:<root>.NumberOperations, m1:<root>.Matrix, m2:<root>.Matrix) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:<root>.NumberOperations
VALUE_PARAMETER name:m1 index:0 type:<root>.Matrix
VALUE_PARAMETER name:m2 index:1 type:<root>.Matrix
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun plus (_context_receiver_0: <root>.NumberOperations, other: <root>.Matrix): <root>.Matrix declared in <root>' type=<root>.Matrix origin=null
$receiver: GET_VAR 'm1: <root>.Matrix declared in <root>.plusMatrix' type=<root>.Matrix origin=null
_context_receiver_0: GET_VAR '<this>: <root>.NumberOperations declared in <root>.plusMatrix' type=<root>.NumberOperations origin=null
other: GET_VAR 'm2: <root>.Matrix declared in <root>.plusMatrix' type=<root>.Matrix origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun plus (_context_receiver_0: <root>.NumberOperations, other: <root>.Matrix): <root>.Matrix declared in <root>' type=<root>.Matrix origin=null
$receiver: GET_VAR 'm2: <root>.Matrix declared in <root>.plusMatrix' type=<root>.Matrix origin=null
_context_receiver_0: GET_VAR '<this>: <root>.NumberOperations declared in <root>.plusMatrix' type=<root>.NumberOperations origin=null
other: GET_VAR 'm1: <root>.Matrix declared in <root>.plusMatrix' type=<root>.Matrix origin=null
@@ -1,22 +0,0 @@
interface NumberOperations {
abstract fun Number.plus(other: Number): Number
}
class Matrix {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
fun Matrix.plus(_context_receiver_0: NumberOperations, other: Matrix): Matrix {
return TODO()
}
fun NumberOperations.plusMatrix(m1: Matrix, m2: Matrix) {
m1.plus(_context_receiver_0 = <this>, other = m2) /*~> Unit */
m2.plus(_context_receiver_0 = <this>, other = m1) /*~> Unit */
}
@@ -37,13 +37,13 @@ FILE fqName:<root> fileName:/plusMatrix.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:plus visibility:public modality:FINAL <> ($receiver:<root>.Matrix, <this>:<root>.NumberOperations, other:<root>.Matrix) returnType:<root>.Matrix
FUN name:plus visibility:public modality:FINAL <> ($receiver:<root>.Matrix, _context_receiver_0:<root>.NumberOperations, other:<root>.Matrix) returnType:<root>.Matrix
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Matrix
VALUE_PARAMETER name:<this> index:0 type:<root>.NumberOperations
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.NumberOperations
VALUE_PARAMETER name:other index:1 type:<root>.Matrix
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun plus (<this>: <root>.NumberOperations, other: <root>.Matrix): <root>.Matrix declared in <root>'
RETURN type=kotlin.Nothing from='public final fun plus (_context_receiver_0: <root>.NumberOperations, other: <root>.Matrix): <root>.Matrix declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
FUN name:plusMatrix visibility:public modality:FINAL <> ($receiver:<root>.NumberOperations, m1:<root>.Matrix, m2:<root>.Matrix) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:<root>.NumberOperations
@@ -51,12 +51,12 @@ FILE fqName:<root> fileName:/plusMatrix.kt
VALUE_PARAMETER name:m2 index:1 type:<root>.Matrix
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun plus (<this>: <root>.NumberOperations, other: <root>.Matrix): <root>.Matrix declared in <root>' type=<root>.Matrix origin=null
CALL 'public final fun plus (_context_receiver_0: <root>.NumberOperations, other: <root>.Matrix): <root>.Matrix declared in <root>' type=<root>.Matrix origin=null
$receiver: GET_VAR 'm1: <root>.Matrix declared in <root>.plusMatrix' type=<root>.Matrix origin=null
<this>: GET_VAR '<this>: <root>.NumberOperations declared in <root>.plusMatrix' type=<root>.NumberOperations origin=null
_context_receiver_0: GET_VAR '<this>: <root>.NumberOperations declared in <root>.plusMatrix' type=<root>.NumberOperations origin=null
other: GET_VAR 'm2: <root>.Matrix declared in <root>.plusMatrix' type=<root>.Matrix origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun plus (<this>: <root>.NumberOperations, other: <root>.Matrix): <root>.Matrix declared in <root>' type=<root>.Matrix origin=null
CALL 'public final fun plus (_context_receiver_0: <root>.NumberOperations, other: <root>.Matrix): <root>.Matrix declared in <root>' type=<root>.Matrix origin=null
$receiver: GET_VAR 'm2: <root>.Matrix declared in <root>.plusMatrix' type=<root>.Matrix origin=null
<this>: GET_VAR '<this>: <root>.NumberOperations declared in <root>.plusMatrix' type=<root>.NumberOperations origin=null
_context_receiver_0: GET_VAR '<this>: <root>.NumberOperations declared in <root>.plusMatrix' type=<root>.NumberOperations origin=null
other: GET_VAR 'm1: <root>.Matrix declared in <root>.plusMatrix' type=<root>.Matrix origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ContextReceivers
// !DIAGNOSTICS: -UNUSED_PARAMETER
@@ -12,11 +12,11 @@ class Matrix {
}
fun Matrix.plus(<this>: NumberOperations, other: Matrix): Matrix {
fun Matrix.plus(_context_receiver_0: NumberOperations, other: Matrix): Matrix {
return TODO()
}
fun NumberOperations.plusMatrix(m1: Matrix, m2: Matrix) {
m1.plus(<this> = <this>, other = m2) /*~> Unit */
m2.plus(<this> = <this>, other = m1) /*~> Unit */
m1.plus(_context_receiver_0 = <this>, other = m2) /*~> Unit */
m2.plus(_context_receiver_0 = <this>, other = m1) /*~> Unit */
}
@@ -1,48 +0,0 @@
FILE fqName:<root> fileName:/property.kt
CLASS INTERFACE name:A modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
FUN name:a visibility:public modality:ABSTRACT <> ($this:<root>.A) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.A
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS INTERFACE name:B modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B
FUN name:b visibility:public modality:ABSTRACT <> ($this:<root>.B) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.B
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY name:c visibility:public modality:FINAL [val]
FUN name:<get-c> visibility:public modality:FINAL <> (_context_receiver_0:<root>.A, _context_receiver_1:<root>.B) returnType:kotlin.Int
correspondingProperty: PROPERTY name:c visibility:public modality:FINAL [val]
contextReceiverParametersCount: 2
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.A
VALUE_PARAMETER name:_context_receiver_1 index:1 type:<root>.B
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-c> (_context_receiver_0: <root>.A, _context_receiver_1: <root>.B): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public abstract fun a (): kotlin.Int declared in <root>.A' type=kotlin.Int origin=null
$this: GET_VAR '_context_receiver_0: <root>.A declared in <root>.<get-c>' type=<root>.A origin=null
other: CALL 'public abstract fun b (): kotlin.Int declared in <root>.B' type=kotlin.Int origin=null
$this: GET_VAR '_context_receiver_1: <root>.B declared in <root>.<get-c>' type=<root>.B origin=null
@@ -1,14 +0,0 @@
interface A {
abstract fun a(): Int
}
interface B {
abstract fun b(): Int
}
val c: Int
get(_context_receiver_0: A, _context_receiver_1: B): Int {
return _context_receiver_0.a().plus(other = _context_receiver_1.b())
}
@@ -34,15 +34,15 @@ FILE fqName:<root> fileName:/property.kt
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY name:c visibility:public modality:FINAL [val]
FUN name:<get-c> visibility:public modality:FINAL <> (<this>:<root>.A, <this>:<root>.B) returnType:kotlin.Int
FUN name:<get-c> visibility:public modality:FINAL <> (_context_receiver_0:<root>.A, _context_receiver_1:<root>.B) returnType:kotlin.Int
correspondingProperty: PROPERTY name:c visibility:public modality:FINAL [val]
contextReceiverParametersCount: 2
VALUE_PARAMETER name:<this> index:0 type:<root>.A
VALUE_PARAMETER name:<this> index:1 type:<root>.B
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.A
VALUE_PARAMETER name:_context_receiver_1 index:1 type:<root>.B
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-c> (<this>: <root>.A, <this>: <root>.B): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun <get-c> (_context_receiver_0: <root>.A, _context_receiver_1: <root>.B): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public abstract fun a (): kotlin.Int declared in <root>.A' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.A declared in <root>.<get-c>' type=<root>.A origin=null
$this: GET_VAR '_context_receiver_0: <root>.A declared in <root>.<get-c>' type=<root>.A origin=null
other: CALL 'public abstract fun b (): kotlin.Int declared in <root>.B' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.B declared in <root>.<get-c>' type=<root>.B origin=null
$this: GET_VAR '_context_receiver_1: <root>.B declared in <root>.<get-c>' type=<root>.B origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ContextReceivers
interface A {
@@ -9,7 +9,6 @@ interface B {
}
val c: Int
get(<this>: A, <this>: B): Int {
return <this>.a().plus(other = <this>.b())
get(_context_receiver_0: A, _context_receiver_1: B): Int {
return _context_receiver_0.a().plus(other = _context_receiver_1.b())
}
@@ -1,143 +0,0 @@
FILE fqName:<root> fileName:/thisWithCustomLabel.kt
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A<T of <root>.A>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> (a:T of <root>.A) returnType:<root>.A<T of <root>.A> [primary]
VALUE_PARAMETER name:a index:0 type:T of <root>.A
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:a visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:a type:T of <root>.A visibility:private [final]
EXPRESSION_BODY
GET_VAR 'a: T of <root>.A declared in <root>.A.<init>' type=T of <root>.A origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:FINAL <> ($this:<root>.A<T of <root>.A>) returnType:T of <root>.A
correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A<T of <root>.A>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-a> (): T of <root>.A declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:T of <root>.A visibility:private [final]' type=T of <root>.A origin=null
receiver: GET_VAR '<this>: <root>.A<T of <root>.A> declared in <root>.A.<get-a>' type=<root>.A<T of <root>.A> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:B modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B
CONSTRUCTOR visibility:public <> (b:kotlin.Any) returnType:<root>.B [primary]
VALUE_PARAMETER name:b index:0 type:kotlin.Any
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:b visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.Any visibility:private [final]
EXPRESSION_BODY
GET_VAR 'b: kotlin.Any declared in <root>.B.<init>' type=kotlin.Any origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-b> visibility:public modality:FINAL <> ($this:<root>.B) returnType:kotlin.Any
correspondingProperty: PROPERTY name:b visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.B
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-b> (): kotlin.Any declared in <root>.B'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
receiver: GET_VAR '<this>: <root>.B declared in <root>.B.<get-b>' type=<root>.B origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
CONSTRUCTOR visibility:public <> (c:kotlin.Any) returnType:<root>.C [primary]
VALUE_PARAMETER name:c index:0 type:kotlin.Any
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:c visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.Any visibility:private [final]
EXPRESSION_BODY
GET_VAR 'c: kotlin.Any declared in <root>.C.<init>' type=kotlin.Any origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-c> visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Any
correspondingProperty: PROPERTY name:c visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-c> (): kotlin.Any declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-c>' type=<root>.C origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:f visibility:public modality:FINAL <> (_context_receiver_0:<root>.A<kotlin.Int>, _context_receiver_1:<root>.A<kotlin.String>, _context_receiver_2:<root>.B) returnType:kotlin.Unit
contextReceiverParametersCount: 3
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.A<kotlin.Int>
VALUE_PARAMETER name:_context_receiver_1 index:1 type:<root>.A<kotlin.String>
VALUE_PARAMETER name:_context_receiver_2 index:2 type:<root>.B
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun toFloat (): kotlin.Float declared in kotlin.Int' type=kotlin.Float origin=null
$this: CALL 'public final fun <get-a> (): T of <root>.A declared in <root>.A' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '_context_receiver_0: <root>.A<kotlin.Int> declared in <root>.f' type=<root>.A<kotlin.Int> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
$this: CALL 'public final fun <get-a> (): T of <root>.A declared in <root>.A' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '_context_receiver_1: <root>.A<kotlin.String> declared in <root>.f' type=<root>.A<kotlin.String> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-b> (): kotlin.Any declared in <root>.B' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '_context_receiver_2: <root>.B declared in <root>.f' type=<root>.B origin=null
PROPERTY name:p visibility:public modality:FINAL [val]
FUN name:<get-p> visibility:public modality:FINAL <> ($receiver:<root>.C, _context_receiver_0:<root>.A<kotlin.Int>, _context_receiver_1:<root>.A<kotlin.String>, _context_receiver_2:<root>.B) returnType:kotlin.Int
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [val]
contextReceiverParametersCount: 3
$receiver: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.A<kotlin.Int>
VALUE_PARAMETER name:_context_receiver_1 index:1 type:<root>.A<kotlin.String>
VALUE_PARAMETER name:_context_receiver_2 index:2 type:<root>.B
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun toFloat (): kotlin.Float declared in kotlin.Int' type=kotlin.Float origin=null
$this: CALL 'public final fun <get-a> (): T of <root>.A declared in <root>.A' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '_context_receiver_0: <root>.A<kotlin.Int> declared in <root>.<get-p>' type=<root>.A<kotlin.Int> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
$this: CALL 'public final fun <get-a> (): T of <root>.A declared in <root>.A' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '_context_receiver_1: <root>.A<kotlin.String> declared in <root>.<get-p>' type=<root>.A<kotlin.String> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-b> (): kotlin.Any declared in <root>.B' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '_context_receiver_2: <root>.B declared in <root>.<get-p>' type=<root>.B origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Any declared in <root>.C' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.<get-p>' type=<root>.C origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Any declared in <root>.C' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.<get-p>' type=<root>.C origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Any declared in <root>.C' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.<get-p>' type=<root>.C origin=null
RETURN type=kotlin.Nothing from='public final fun <get-p> (_context_receiver_0: <root>.A<kotlin.Int>, _context_receiver_1: <root>.A<kotlin.String>, _context_receiver_2: <root>.B): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=1
@@ -1,55 +0,0 @@
class A<T : Any?> {
constructor(a: T) /* primary */ {
super/*Any*/()
/* <init>() */
}
val a: T
field = a
get
}
class B {
constructor(b: Any) /* primary */ {
super/*Any*/()
/* <init>() */
}
val b: Any
field = b
get
}
class C {
constructor(c: Any) /* primary */ {
super/*Any*/()
/* <init>() */
}
val c: Any
field = c
get
}
fun f(_context_receiver_0: A<Int>, _context_receiver_1: A<String>, _context_receiver_2: B) {
_context_receiver_0.<get-a>().toFloat() /*~> Unit */
_context_receiver_1.<get-a>().<get-length>() /*~> Unit */
_context_receiver_2.<get-b>() /*~> Unit */
}
val C.p: Int
get(_context_receiver_0: A<Int>, _context_receiver_1: A<String>, _context_receiver_2: B): Int {
_context_receiver_0.<get-a>().toFloat() /*~> Unit */
_context_receiver_1.<get-a>().<get-length>() /*~> Unit */
_context_receiver_2.<get-b>() /*~> Unit */
<this>.<get-c>() /*~> Unit */
<this>.<get-c>() /*~> Unit */
<this>.<get-c>() /*~> Unit */
return 1
}
@@ -93,43 +93,43 @@ FILE fqName:<root> fileName:/thisWithCustomLabel.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:f visibility:public modality:FINAL <> (<this>:<root>.A<kotlin.Int>, <this>:<root>.A<kotlin.String>, <this>:<root>.B) returnType:kotlin.Unit
FUN name:f visibility:public modality:FINAL <> (_context_receiver_0:<root>.A<kotlin.Int>, _context_receiver_1:<root>.A<kotlin.String>, _context_receiver_2:<root>.B) returnType:kotlin.Unit
contextReceiverParametersCount: 3
VALUE_PARAMETER name:<this> index:0 type:<root>.A<kotlin.Int>
VALUE_PARAMETER name:<this> index:1 type:<root>.A<kotlin.String>
VALUE_PARAMETER name:<this> index:2 type:<root>.B
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.A<kotlin.Int>
VALUE_PARAMETER name:_context_receiver_1 index:1 type:<root>.A<kotlin.String>
VALUE_PARAMETER name:_context_receiver_2 index:2 type:<root>.B
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun toFloat (): kotlin.Float declared in kotlin.Int' type=kotlin.Float origin=null
$this: CALL 'public final fun <get-a> (): T of <root>.A declared in <root>.A' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.A<kotlin.Int> declared in <root>.f' type=<root>.A<kotlin.Int> origin=null
$this: GET_VAR '_context_receiver_0: <root>.A<kotlin.Int> declared in <root>.f' type=<root>.A<kotlin.Int> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
$this: CALL 'public final fun <get-a> (): T of <root>.A declared in <root>.A' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.A<kotlin.String> declared in <root>.f' type=<root>.A<kotlin.String> origin=null
$this: GET_VAR '_context_receiver_1: <root>.A<kotlin.String> declared in <root>.f' type=<root>.A<kotlin.String> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-b> (): kotlin.Any declared in <root>.B' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.B declared in <root>.f' type=<root>.B origin=null
$this: GET_VAR '_context_receiver_2: <root>.B declared in <root>.f' type=<root>.B origin=null
PROPERTY name:p visibility:public modality:FINAL [val]
FUN name:<get-p> visibility:public modality:FINAL <> ($receiver:<root>.C, <this>:<root>.A<kotlin.Int>, <this>:<root>.A<kotlin.String>, <this>:<root>.B) returnType:kotlin.Int
FUN name:<get-p> visibility:public modality:FINAL <> ($receiver:<root>.C, _context_receiver_0:<root>.A<kotlin.Int>, _context_receiver_1:<root>.A<kotlin.String>, _context_receiver_2:<root>.B) returnType:kotlin.Int
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [val]
contextReceiverParametersCount: 3
$receiver: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:<this> index:0 type:<root>.A<kotlin.Int>
VALUE_PARAMETER name:<this> index:1 type:<root>.A<kotlin.String>
VALUE_PARAMETER name:<this> index:2 type:<root>.B
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.A<kotlin.Int>
VALUE_PARAMETER name:_context_receiver_1 index:1 type:<root>.A<kotlin.String>
VALUE_PARAMETER name:_context_receiver_2 index:2 type:<root>.B
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun toFloat (): kotlin.Float declared in kotlin.Int' type=kotlin.Float origin=null
$this: CALL 'public final fun <get-a> (): T of <root>.A declared in <root>.A' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.A<kotlin.Int> declared in <root>.<get-p>' type=<root>.A<kotlin.Int> origin=null
$this: GET_VAR '_context_receiver_0: <root>.A<kotlin.Int> declared in <root>.<get-p>' type=<root>.A<kotlin.Int> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
$this: CALL 'public final fun <get-a> (): T of <root>.A declared in <root>.A' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.A<kotlin.String> declared in <root>.<get-p>' type=<root>.A<kotlin.String> origin=null
$this: GET_VAR '_context_receiver_1: <root>.A<kotlin.String> declared in <root>.<get-p>' type=<root>.A<kotlin.String> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-b> (): kotlin.Any declared in <root>.B' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.B declared in <root>.<get-p>' type=<root>.B origin=null
$this: GET_VAR '_context_receiver_2: <root>.B declared in <root>.<get-p>' type=<root>.B origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Any declared in <root>.C' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.<get-p>' type=<root>.C origin=null
@@ -139,5 +139,5 @@ FILE fqName:<root> fileName:/thisWithCustomLabel.kt
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Any declared in <root>.C' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.<get-p>' type=<root>.C origin=null
RETURN type=kotlin.Nothing from='public final fun <get-p> (<this>: <root>.A<kotlin.Int>, <this>: <root>.A<kotlin.String>, <this>: <root>.B): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun <get-p> (_context_receiver_0: <root>.A<kotlin.Int>, _context_receiver_1: <root>.A<kotlin.String>, _context_receiver_2: <root>.B): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=1
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ContextReceivers
class A<T>(val a: T)
@@ -37,17 +37,17 @@ class C {
}
fun f(<this>: A<Int>, <this>: A<String>, <this>: B) {
<this>.<get-a>().toFloat() /*~> Unit */
<this>.<get-a>().<get-length>() /*~> Unit */
<this>.<get-b>() /*~> Unit */
fun f(_context_receiver_0: A<Int>, _context_receiver_1: A<String>, _context_receiver_2: B) {
_context_receiver_0.<get-a>().toFloat() /*~> Unit */
_context_receiver_1.<get-a>().<get-length>() /*~> Unit */
_context_receiver_2.<get-b>() /*~> Unit */
}
val C.p: Int
get(<this>: A<Int>, <this>: A<String>, <this>: B): Int {
<this>.<get-a>().toFloat() /*~> Unit */
<this>.<get-a>().<get-length>() /*~> Unit */
<this>.<get-b>() /*~> Unit */
get(_context_receiver_0: A<Int>, _context_receiver_1: A<String>, _context_receiver_2: B): Int {
_context_receiver_0.<get-a>().toFloat() /*~> Unit */
_context_receiver_1.<get-a>().<get-length>() /*~> Unit */
_context_receiver_2.<get-b>() /*~> Unit */
<this>.<get-c>() /*~> Unit */
<this>.<get-c>() /*~> Unit */
<this>.<get-c>() /*~> Unit */
@@ -1,27 +0,0 @@
FILE fqName:<root> fileName:/typeParameterAsContextReceiver.kt
FUN name:useContext visibility:public modality:FINAL <T> (_context_receiver_0:T of <root>.useContext, block:kotlin.Function1<T of <root>.useContext, kotlin.Unit>) returnType:kotlin.Unit
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
contextReceiverParametersCount: 1
VALUE_PARAMETER name:_context_receiver_0 index:0 type:T of <root>.useContext
VALUE_PARAMETER name:block index:1 type:kotlin.Function1<T of <root>.useContext, kotlin.Unit>
BLOCK_BODY
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.Unit origin=null
<T>: kotlin.Int
<R>: kotlin.Unit
receiver: CONST Int type=kotlin.Int value=42
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
CALL 'public final fun useContext <T> (_context_receiver_0: T of <root>.useContext, block: kotlin.Function1<T of <root>.useContext, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<T>: kotlin.Int
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.test.<anonymous>' type=kotlin.Int origin=null
block: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (i:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun toDouble (): kotlin.Double declared in kotlin.Int' type=kotlin.Double origin=null
$this: GET_VAR 'i: kotlin.Int declared in <root>.test.<anonymous>.<anonymous>' type=kotlin.Int origin=null
@@ -1,12 +0,0 @@
fun <T : Any?> useContext(_context_receiver_0: T, block: Function1<T, Unit>) {
}
fun test() {
with<Int, Unit>(receiver = 42, block = local fun Int.<anonymous>() {
useContext<Int>(_context_receiver_0 = $this$with, block = local fun <anonymous>(i: Int) {
i.toDouble() /*~> Unit */
}
)
}
)
}
@@ -1,8 +1,8 @@
FILE fqName:<root> fileName:/typeParameterAsContextReceiver.kt
FUN name:useContext visibility:public modality:FINAL <T> (<this>:T of <root>.useContext, block:kotlin.Function1<T of <root>.useContext, kotlin.Unit>) returnType:kotlin.Unit
FUN name:useContext visibility:public modality:FINAL <T> (_context_receiver_0:T of <root>.useContext, block:kotlin.Function1<T of <root>.useContext, kotlin.Unit>) returnType:kotlin.Unit
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:T of <root>.useContext
VALUE_PARAMETER name:_context_receiver_0 index:0 type:T of <root>.useContext
VALUE_PARAMETER name:block index:1 type:kotlin.Function1<T of <root>.useContext, kotlin.Unit>
BLOCK_BODY
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
@@ -15,9 +15,9 @@ FILE fqName:<root> fileName:/typeParameterAsContextReceiver.kt
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
CALL 'public final fun useContext <T> (<this>: T of <root>.useContext, block: kotlin.Function1<T of <root>.useContext, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
CALL 'public final fun useContext <T> (_context_receiver_0: T of <root>.useContext, block: kotlin.Function1<T of <root>.useContext, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<T>: kotlin.Int
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.test.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.test.<anonymous>' type=kotlin.Int origin=null
block: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (i:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER name:i index:0 type:kotlin.Int
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ContextReceivers
context(T)
@@ -1,9 +1,9 @@
fun <T : Any?> useContext(<this>: T, block: Function1<T, Unit>) {
fun <T : Any?> useContext(_context_receiver_0: T, block: Function1<T, Unit>) {
}
fun test() {
with<Int, Unit>(receiver = 42, block = local fun Int.<anonymous>() {
useContext<Int>(<this> = $this$with, block = local fun <anonymous>(i: Int) {
useContext<Int>(_context_receiver_0 = $this$with, block = local fun <anonymous>(i: Int) {
i.toDouble() /*~> Unit */
}
)
@@ -103,32 +103,32 @@ FILE fqName:<root> fileName:/unaryOperators.kt
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-operationScore>' type=kotlin.Int origin=null
FUN name:unaryMinus visibility:public modality:FINAL <> ($receiver:<root>.Result, <this>:kotlin.Int) returnType:<root>.Result [operator]
FUN name:unaryMinus visibility:public modality:FINAL <> ($receiver:<root>.Result, _context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.unaryMinus' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun unaryMinus (<this>: kotlin.Int): <root>.Result [operator] declared in <root>'
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.unaryMinus' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun unaryMinus (_context_receiver_0: kotlin.Int): <root>.Result [operator] declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=UMINUS
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Result declared in <root>.unaryMinus' type=<root>.Result origin=null
FUN name:unaryPlus visibility:public modality:FINAL <> ($receiver:<root>.Result, <this>:kotlin.Int) returnType:<root>.Result [operator]
FUN name:unaryPlus visibility:public modality:FINAL <> ($receiver:<root>.Result, _context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.unaryPlus' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun unaryPlus (<this>: kotlin.Int): <root>.Result [operator] declared in <root>'
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.unaryPlus' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun unaryPlus (_context_receiver_0: kotlin.Int): <root>.Result [operator] declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: WHEN type=kotlin.Int origin=IF
BRANCH
@@ -143,33 +143,33 @@ FILE fqName:<root> fileName:/unaryOperators.kt
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Result declared in <root>.unaryPlus' type=<root>.Result origin=null
FUN name:inc visibility:public modality:FINAL <> ($receiver:<root>.Result, <this>:kotlin.Int) returnType:<root>.Result [operator]
FUN name:inc visibility:public modality:FINAL <> ($receiver:<root>.Result, _context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.inc' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun inc (<this>: kotlin.Int): <root>.Result [operator] declared in <root>'
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.inc' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun inc (_context_receiver_0: kotlin.Int): <root>.Result [operator] declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Result declared in <root>.inc' type=<root>.Result origin=null
other: CONST Int type=kotlin.Int value=1
FUN name:dec visibility:public modality:FINAL <> ($receiver:<root>.Result, <this>:kotlin.Int) returnType:<root>.Result [operator]
FUN name:dec visibility:public modality:FINAL <> ($receiver:<root>.Result, _context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '<this>: kotlin.Int declared in <root>.dec' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun dec (<this>: kotlin.Int): <root>.Result [operator] declared in <root>'
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.dec' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun dec (_context_receiver_0: kotlin.Int): <root>.Result [operator] declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=MINUS
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
@@ -194,35 +194,35 @@ FILE fqName:<root> fileName:/unaryOperators.kt
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.Result [val]
GET_VAR 'var result: <root>.Result [var] declared in <root>.box' type=<root>.Result origin=POSTFIX_INCR
SET_VAR 'var result: <root>.Result [var] declared in <root>.box' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc (<this>: kotlin.Int): <root>.Result [operator] declared in <root>' type=<root>.Result origin=POSTFIX_INCR
CALL 'public final fun inc (_context_receiver_0: kotlin.Int): <root>.Result [operator] declared in <root>' type=<root>.Result origin=POSTFIX_INCR
$receiver: GET_VAR 'val tmp_1: <root>.Result [val] declared in <root>.box.<anonymous>' type=<root>.Result origin=null
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
GET_VAR 'val tmp_1: <root>.Result [val] declared in <root>.box.<anonymous>' type=<root>.Result origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=<root>.Result origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:<root>.Result [val]
GET_VAR 'var result: <root>.Result [var] declared in <root>.box' type=<root>.Result origin=POSTFIX_INCR
SET_VAR 'var result: <root>.Result [var] declared in <root>.box' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc (<this>: kotlin.Int): <root>.Result [operator] declared in <root>' type=<root>.Result origin=POSTFIX_INCR
CALL 'public final fun inc (_context_receiver_0: kotlin.Int): <root>.Result [operator] declared in <root>' type=<root>.Result origin=POSTFIX_INCR
$receiver: GET_VAR 'val tmp_2: <root>.Result [val] declared in <root>.box.<anonymous>' type=<root>.Result origin=null
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
GET_VAR 'val tmp_2: <root>.Result [val] declared in <root>.box.<anonymous>' type=<root>.Result origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun unaryMinus (<this>: kotlin.Int): <root>.Result [operator] declared in <root>' type=<root>.Result origin=UMINUS
CALL 'public final fun unaryMinus (_context_receiver_0: kotlin.Int): <root>.Result [operator] declared in <root>' type=<root>.Result origin=UMINUS
$receiver: GET_VAR 'var result: <root>.Result [var] declared in <root>.box' type=<root>.Result origin=null
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun unaryPlus (<this>: kotlin.Int): <root>.Result [operator] declared in <root>' type=<root>.Result origin=UPLUS
CALL 'public final fun unaryPlus (_context_receiver_0: kotlin.Int): <root>.Result [operator] declared in <root>' type=<root>.Result origin=UPLUS
$receiver: GET_VAR 'var result: <root>.Result [var] declared in <root>.box' type=<root>.Result origin=null
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): <root>.Result declared in <root>.box'
BLOCK type=<root>.Result origin=POSTFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:<root>.Result [val]
GET_VAR 'var result: <root>.Result [var] declared in <root>.box' type=<root>.Result origin=POSTFIX_DECR
SET_VAR 'var result: <root>.Result [var] declared in <root>.box' type=kotlin.Unit origin=POSTFIX_DECR
CALL 'public final fun dec (<this>: kotlin.Int): <root>.Result [operator] declared in <root>' type=<root>.Result origin=POSTFIX_DECR
CALL 'public final fun dec (_context_receiver_0: kotlin.Int): <root>.Result [operator] declared in <root>' type=<root>.Result origin=POSTFIX_DECR
$receiver: GET_VAR 'val tmp_3: <root>.Result [val] declared in <root>.box.<anonymous>' type=<root>.Result origin=null
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
GET_VAR 'val tmp_3: <root>.Result [val] declared in <root>.box.<anonymous>' type=<root>.Result origin=null
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
WHEN type=kotlin.String origin=IF
@@ -46,16 +46,16 @@ var operationScore: Int
get
set
operator fun Result.unaryMinus(<this>: Int): Result {
operator fun Result.unaryMinus(_context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return Result(i = <this>.<get-i>().unaryMinus())
}
operator fun Result.unaryPlus(<this>: Int): Result {
operator fun Result.unaryPlus(_context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return Result(i = when {
less(arg0 = <this>.<get-i>(), arg1 = 0) -> <this>.<get-i>().unaryMinus()
@@ -63,16 +63,16 @@ operator fun Result.unaryPlus(<this>: Int): Result {
})
}
operator fun Result.inc(<this>: Int): Result {
operator fun Result.inc(_context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return Result(i = <this>.<get-i>().plus(other = 1))
}
operator fun Result.dec(<this>: Int): Result {
operator fun Result.dec(_context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return Result(i = <this>.<get-i>().minus(other = 1))
}
@@ -82,19 +82,19 @@ fun box(): String {
with<Int, Result>(receiver = 1, block = local fun Int.<anonymous>(): Result {
{ // BLOCK
val tmp0: Result = result
result = tmp0.inc(<this> = $this$with)
result = tmp0.inc(_context_receiver_0 = $this$with)
tmp0
} /*~> Unit */
{ // BLOCK
val tmp1: Result = result
result = tmp1.inc(<this> = $this$with)
result = tmp1.inc(_context_receiver_0 = $this$with)
tmp1
} /*~> Unit */
result.unaryMinus(<this> = $this$with) /*~> Unit */
result.unaryPlus(<this> = $this$with) /*~> Unit */
result.unaryMinus(_context_receiver_0 = $this$with) /*~> Unit */
result.unaryPlus(_context_receiver_0 = $this$with) /*~> Unit */
return { // BLOCK
val tmp2: Result = result
result = tmp2.dec(<this> = $this$with)
result = tmp2.dec(_context_receiver_0 = $this$with)
tmp2
}
}
@@ -61,4 +61,8 @@ object NameUtils {
fun propertyDelegateName(propertyName: Name): Name {
return Name.identifier("${propertyName.asString()}\$delegate")
}
@JvmStatic
fun contextReceiverName(index: Int): Name =
Name.identifier("_context_receiver_$index")
}
@@ -20,6 +20,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.descriptors.*;
import org.jetbrains.kotlin.descriptors.annotations.Annotations;
import org.jetbrains.kotlin.name.Name;
import org.jetbrains.kotlin.name.SpecialNames;
import org.jetbrains.kotlin.resolve.scopes.receivers.TransientReceiver;
import org.jetbrains.kotlin.types.KotlinType;
@@ -36,6 +37,10 @@ public abstract class AbstractReceiverParameterDescriptor extends DeclarationDes
super(annotations, SpecialNames.THIS);
}
public AbstractReceiverParameterDescriptor(@NotNull Annotations annotations, @NotNull Name name) {
super(annotations, name);
}
@Nullable
@Override
public ReceiverParameterDescriptor substitute(@NotNull TypeSubstitutor substitutor) {
@@ -628,6 +628,7 @@ public abstract class FunctionDescriptorImpl extends DeclarationDescriptorNonRoo
List<ReceiverParameterDescriptor> substitutedContextReceiverParameters = new ArrayList<ReceiverParameterDescriptor>();
if (!configuration.newContextReceiverParameters.isEmpty()) {
int index = 0;
for (ReceiverParameterDescriptor newContextReceiverParameter : configuration.newContextReceiverParameters) {
KotlinType substitutedContextReceiverType =
substitutor.substitute(newContextReceiverParameter.getType(), Variance.IN_VARIANCE);
@@ -637,7 +638,8 @@ public abstract class FunctionDescriptorImpl extends DeclarationDescriptorNonRoo
ReceiverParameterDescriptor substitutedContextReceiverParameter =
DescriptorFactory.createContextReceiverParameterForCallable(substitutedDescriptor, substitutedContextReceiverType,
((ImplicitContextReceiver)newContextReceiverParameter.getValue()).getCustomLabelName(),
newContextReceiverParameter.getAnnotations());
newContextReceiverParameter.getAnnotations(),
index++);
substitutedContextReceiverParameters.add(substitutedContextReceiverParameter);
wereChanges[0] |= substitutedContextReceiverType != newContextReceiverParameter.getType();
@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor;
import org.jetbrains.kotlin.descriptors.ReceiverParameterDescriptor;
import org.jetbrains.kotlin.descriptors.annotations.Annotations;
import org.jetbrains.kotlin.name.Name;
import org.jetbrains.kotlin.name.SpecialNames;
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue;
import org.jetbrains.kotlin.types.KotlinType;
import org.jetbrains.kotlin.types.typeUtil.TypeUtilsKt;
@@ -33,7 +35,16 @@ public class ReceiverParameterDescriptorImpl extends AbstractReceiverParameterDe
@NotNull ReceiverValue value,
@NotNull Annotations annotations
) {
super(annotations);
this(containingDeclaration, value, annotations, SpecialNames.THIS);
}
public ReceiverParameterDescriptorImpl(
@NotNull DeclarationDescriptor containingDeclaration,
@NotNull ReceiverValue value,
@NotNull Annotations annotations,
@NotNull Name name
) {
super(annotations, name);
this.containingDeclaration = containingDeclaration;
this.value = value;
}
@@ -22,6 +22,7 @@ import org.jetbrains.kotlin.descriptors.*;
import org.jetbrains.kotlin.descriptors.annotations.Annotations;
import org.jetbrains.kotlin.descriptors.impl.*;
import org.jetbrains.kotlin.name.Name;
import org.jetbrains.kotlin.name.NameUtils;
import org.jetbrains.kotlin.name.StandardClassIds;
import org.jetbrains.kotlin.resolve.scopes.receivers.ContextClassReceiver;
import org.jetbrains.kotlin.resolve.scopes.receivers.ContextReceiver;
@@ -231,11 +232,13 @@ public class DescriptorFactory {
@NotNull CallableDescriptor owner,
@Nullable KotlinType receiverParameterType,
@Nullable Name customLabelName,
@NotNull Annotations annotations
@NotNull Annotations annotations,
int index
) {
return receiverParameterType == null
? null
: new ReceiverParameterDescriptorImpl(owner, new ContextReceiver(owner, receiverParameterType, customLabelName, null), annotations);
: new ReceiverParameterDescriptorImpl(owner, new ContextReceiver(owner, receiverParameterType, customLabelName, null), annotations,
NameUtils.contextReceiverName(index));
}
@Nullable
@@ -60,7 +60,7 @@ class MemberDeserializer(private val c: DeserializationContext) {
proto.receiverType(c.typeTable)?.let(local.typeDeserializer::type)?.let { receiverType ->
DescriptorFactory.createExtensionReceiverParameterForCallable(property, receiverType, receiverAnnotations)
},
proto.contextReceiverTypes(c.typeTable).map { it.toContextReceiver(local, property) }
proto.contextReceiverTypes(c.typeTable).mapIndexed { index, type -> type.toContextReceiver(local, property, index) }
)
// Per documentation on Property.getter_flags in metadata.proto, if an accessor flags field is absent, its value should be computed
@@ -212,7 +212,7 @@ class MemberDeserializer(private val c: DeserializationContext) {
DescriptorFactory.createExtensionReceiverParameterForCallable(function, receiverType, receiverAnnotations)
},
getDispatchReceiverParameter(),
proto.contextReceiverTypes(c.typeTable).mapNotNull { it.toContextReceiver(local, function) },
proto.contextReceiverTypes(c.typeTable).mapIndexedNotNull { index, type -> type.toContextReceiver(local, function, index) },
local.typeDeserializer.ownTypeParameters,
local.memberDeserializer.valueParameters(proto.valueParameterList, proto, AnnotatedCallableKind.FUNCTION),
local.typeDeserializer.type(proto.returnType(c.typeTable)),
@@ -355,14 +355,16 @@ class MemberDeserializer(private val c: DeserializationContext) {
private fun ProtoBuf.Type.toContextReceiver(
deserializationContext: DeserializationContext,
callableDescriptor: CallableDescriptor
callableDescriptor: CallableDescriptor,
index: Int
): ReceiverParameterDescriptor? {
val contextReceiverType = deserializationContext.typeDeserializer.type(this)
return DescriptorFactory.createContextReceiverParameterForCallable(
callableDescriptor,
contextReceiverType,
/* customLabelName = */ null/*todo store custom label name in metadata?*/,
Annotations.EMPTY
Annotations.EMPTY,
index
)
}
}