[Tests] Use stable order for ir/kotlinLike dumps

^KT-65406
This commit is contained in:
Pavel Kunyavskiy
2024-02-05 16:23:41 +01:00
committed by Space Team
parent 0fa42a9c11
commit e6f4d6e6fa
1265 changed files with 43896 additions and 48472 deletions
@@ -1,11 +1,21 @@
FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
PROPERTY name:operationScore visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-operationScore> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-operationScore> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-operationScore> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
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
CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyContainer
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.MyContainer [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:i visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private
EXPRESSION_BODY
@@ -25,6 +35,11 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.<set-i>' type=<root>.MyContainer origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.MyContainer.<set-i>' type=kotlin.Int origin=null
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.MyContainer [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.MyContainer) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
@@ -41,27 +56,6 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): <root>.MyContainer declared in <root>.MyContainer'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
i: GET_VAR 'i: kotlin.Int declared in <root>.MyContainer.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="MyContainer("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.MyContainer, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -96,74 +90,27 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.MyContainer'
CONST Boolean type=kotlin.Boolean value=true
PROPERTY name:operationScore visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-operationScore> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-operationScore> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-operationScore> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:index index:1 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 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
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 <get-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.MyContainer declared in <root>.get' type=<root>.MyContainer origin=null
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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.MyContainer
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.plusAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.MyContainer' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.MyContainer declared in <root>.plusAssign' type=<root>.MyContainer origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.MyContainer 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, $context_receiver_0:kotlin.Int) returnType:<root>.MyContainer [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.MyContainer
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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
$this: GET_VAR '<this>: <root>.MyContainer declared in <root>.inc' type=<root>.MyContainer origin=null
other: CONST Int type=kotlin.Int value=1
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="MyContainer("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
CONST String type=kotlin.String value=")"
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:myContainer type:<root>.MyContainer [var]
@@ -211,3 +158,56 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST String type=kotlin.String value="fail"
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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:index index:1 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 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
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 <get-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.MyContainer declared in <root>.get' type=<root>.MyContainer origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Int type=kotlin.Int value=-1
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:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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
$this: GET_VAR '<this>: <root>.MyContainer declared in <root>.inc' type=<root>.MyContainer origin=null
other: CONST Int type=kotlin.Int value=1
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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.MyContainer
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.plusAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.MyContainer' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.MyContainer declared in <root>.plusAssign' type=<root>.MyContainer origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.MyContainer 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
@@ -1,15 +1,20 @@
var operationScore: Int
field = 0
get
set
data class MyContainer {
var i: Int
field = i
get
set
constructor(i: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
var i: Int
field = i
get
set
operator fun component1(): Int {
return <this>.#i
}
@@ -18,14 +23,6 @@ data class MyContainer {
return MyContainer(i = i)
}
override fun toString(): String {
return "MyContainer(" + "i=" + <this>.#i + ")"
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -40,29 +37,14 @@ data class MyContainer {
return true
}
}
var operationScore: Int
field = 0
get
set
operator fun MyContainer.get($context_receiver_0: Int, index: Int): Int {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return when {
EQEQ(arg0 = index, arg1 = 0) -> <this>.<get-i>()
else -> -1
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
}
operator fun MyContainer.plusAssign($context_receiver_0: Int, other: MyContainer) {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
<this>.<set-i>(<set-?> = <this>.<get-i>().plus(other = other.<get-i>()))
}
override fun toString(): String {
return "MyContainer(" + "i=" + <this>.#i + ")"
}
operator fun MyContainer.inc($context_receiver_0: Int): MyContainer {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return MyContainer(i = <this>.<get-i>().plus(other = 1))
}
fun box(): String {
@@ -84,3 +66,21 @@ fun box(): String {
}
}
operator fun MyContainer.get($context_receiver_0: Int, index: Int): Int {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return when {
EQEQ(arg0 = index, arg1 = 0) -> <this>.<get-i>()
else -> -1
}
}
operator fun MyContainer.inc($context_receiver_0: Int): MyContainer {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return MyContainer(i = <this>.<get-i>().plus(other = 1))
}
operator fun MyContainer.plusAssign($context_receiver_0: Int, other: MyContainer) {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
<this>.<set-i>(<set-?> = <this>.<get-i>().plus(other = other.<get-i>()))
}
@@ -1,11 +1,21 @@
FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
PROPERTY name:operationScore visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-operationScore> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-operationScore> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-operationScore> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
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
CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyContainer
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.MyContainer [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:i visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private
EXPRESSION_BODY
@@ -25,6 +35,11 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.<set-i>' type=<root>.MyContainer origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.MyContainer.<set-i>' type=kotlin.Int origin=null
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.MyContainer [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.MyContainer) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
@@ -41,27 +56,6 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): <root>.MyContainer declared in <root>.MyContainer'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
i: GET_VAR 'i: kotlin.Int declared in <root>.MyContainer.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="MyContainer("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.MyContainer, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -96,21 +90,74 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.MyContainer'
CONST Boolean type=kotlin.Boolean value=true
PROPERTY name:operationScore visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-operationScore> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-operationScore> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-operationScore> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
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
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="MyContainer("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
CONST String type=kotlin.String value=")"
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:myContainer type:<root>.MyContainer [var]
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
i: CONST Int type=kotlin.Int value=0
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with declared in kotlin' type=kotlin.Unit origin=null
<T>: kotlin.Int
<R>: kotlin.Unit
receiver: CONST Int type=kotlin.Int value=1
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 plusAssign ($context_receiver_0: kotlin.Int, other: <root>.MyContainer): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'var myContainer: <root>.MyContainer declared in <root>.box' type=<root>.MyContainer origin=PLUSEQ
$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) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
i: CALL 'public final fun get ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_ARRAY_ELEMENT
$receiver: BLOCK type=<root>.MyContainer origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.MyContainer [val]
GET_VAR 'var myContainer: <root>.MyContainer declared in <root>.box' type=<root>.MyContainer origin=POSTFIX_INCR
SET_VAR 'var myContainer: <root>.MyContainer declared in <root>.box' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc ($context_receiver_0: kotlin.Int): <root>.MyContainer declared in <root>' type=<root>.MyContainer origin=POSTFIX_INCR
$receiver: GET_VAR 'val tmp_1: <root>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer 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>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer 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
BRANCH
if: WHEN type=kotlin.Boolean origin=ANDAND
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-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'var myContainer: <root>.MyContainer declared in <root>.box' type=<root>.MyContainer origin=null
arg1: CONST Int type=kotlin.Int value=1
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: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
arg1: CONST Int type=kotlin.Int value=3
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=false
then: CONST String type=kotlin.String value="OK"
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST String type=kotlin.String value="fail"
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
@@ -133,27 +180,6 @@ 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, $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:$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 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 '$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
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.MyContainer' type=kotlin.Unit origin=PLUSEQ
$this: GET_VAR 'val tmp_1: <root>.MyContainer declared in <root>.plusAssign' type=<root>.MyContainer origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'val tmp_1: <root>.MyContainer 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, $context_receiver_0:kotlin.Int) returnType:<root>.MyContainer [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.MyContainer
@@ -170,50 +196,24 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.MyContainer declared in <root>.inc' type=<root>.MyContainer origin=null
other: CONST Int type=kotlin.Int value=1
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.MyContainer
BLOCK_BODY
VAR name:myContainer type:<root>.MyContainer [var]
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
i: CONST Int type=kotlin.Int value=0
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with declared in kotlin' type=kotlin.Unit origin=null
<T>: kotlin.Int
<R>: kotlin.Unit
receiver: CONST Int type=kotlin.Int value=1
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 plusAssign ($context_receiver_0: kotlin.Int, other: <root>.MyContainer): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'var myContainer: <root>.MyContainer declared in <root>.box' type=<root>.MyContainer origin=PLUSEQ
$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) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
i: CALL 'public final fun get ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.Int 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 declared in <root>.box' type=<root>.MyContainer origin=POSTFIX_INCR
SET_VAR 'var myContainer: <root>.MyContainer declared in <root>.box' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc ($context_receiver_0: kotlin.Int): <root>.MyContainer declared in <root>' type=<root>.MyContainer origin=POSTFIX_INCR
$receiver: GET_VAR 'val tmp_2: <root>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer 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 declared in <root>.box.<anonymous>' type=<root>.MyContainer 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
BRANCH
if: WHEN type=kotlin.Boolean origin=ANDAND
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-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'var myContainer: <root>.MyContainer declared in <root>.box' type=<root>.MyContainer origin=null
arg1: CONST Int type=kotlin.Int value=1
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: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
arg1: CONST Int type=kotlin.Int value=3
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=false
then: CONST String type=kotlin.String value="OK"
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST String type=kotlin.String value="fail"
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 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 '$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_2 type:<root>.MyContainer [val]
GET_VAR '<this>: <root>.MyContainer declared in <root>.plusAssign' type=<root>.MyContainer origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.MyContainer' type=kotlin.Unit origin=PLUSEQ
$this: GET_VAR 'val tmp_2: <root>.MyContainer declared in <root>.plusAssign' type=<root>.MyContainer origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'val tmp_2: <root>.MyContainer 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
@@ -1,15 +1,20 @@
var operationScore: Int
field = 0
get
set
data class MyContainer {
var i: Int
field = i
get
set
constructor(i: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
var i: Int
field = i
get
set
operator fun component1(): Int {
return <this>.#i
}
@@ -18,14 +23,6 @@ data class MyContainer {
return MyContainer(i = i)
}
override fun toString(): String {
return "MyContainer(" + "i=" + <this>.#i + ")"
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -40,47 +37,23 @@ data class MyContainer {
return true
}
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
var operationScore: Int
field = 0
get
set
override fun toString(): String {
return "MyContainer(" + "i=" + <this>.#i + ")"
}
operator fun MyContainer.get($context_receiver_0: Int, index: Int): Int {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
return when {
EQEQ(arg0 = index, arg1 = 0) -> <this>.<get-i>()
else -> -1
}
}
operator fun MyContainer.plusAssign($context_receiver_0: Int, other: MyContainer) {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
{ // BLOCK
val tmp_1: MyContainer = <this>
tmp_1.<set-i>(<set-?> = tmp_1.<get-i>().plus(other = other.<get-i>()))
}
}
operator fun MyContainer.inc($context_receiver_0: Int): MyContainer {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
return MyContainer(i = <this>.<get-i>().plus(other = 1))
}
fun box(): String {
var myContainer: MyContainer = MyContainer(i = 0)
with<Int, Unit>(receiver = 1, block = local fun Int.<anonymous>() {
myContainer.plusAssign($context_receiver_0 = $this$with, other = MyContainer(i = { // BLOCK
val tmp_2: MyContainer = myContainer
myContainer = tmp_2.inc($context_receiver_0 = $this$with)
tmp_2
val tmp_1: MyContainer = myContainer
myContainer = tmp_1.inc($context_receiver_0 = $this$with)
tmp_1
}.get($context_receiver_0 = $this$with, index = 0)))
}
)
@@ -92,3 +65,31 @@ fun box(): String {
else -> "fail"
}
}
operator fun MyContainer.get($context_receiver_0: Int, index: Int): Int {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
return when {
EQEQ(arg0 = index, arg1 = 0) -> <this>.<get-i>()
else -> -1
}
}
operator fun MyContainer.inc($context_receiver_0: Int): MyContainer {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
return MyContainer(i = <this>.<get-i>().plus(other = 1))
}
operator fun MyContainer.plusAssign($context_receiver_0: Int, other: MyContainer) {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
{ // BLOCK
val tmp_2: MyContainer = <this>
tmp_2.<set-i>(<set-?> = tmp_2.<get-i>().plus(other = other.<get-i>()))
}
}
@@ -1,11 +1,6 @@
FILE fqName:<root> fileName:/arrayAccessOperators.kt
CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyContainer
CONSTRUCTOR visibility:public <> (s:kotlin.String) returnType:<root>.MyContainer [primary]
VALUE_PARAMETER name:s index:0 type:kotlin.String
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:s visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private
EXPRESSION_BODY
@@ -25,6 +20,11 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.<set-s>' type=<root>.MyContainer origin=null
value: GET_VAR '<set-?>: kotlin.String declared in <root>.MyContainer.<set-s>' type=kotlin.String origin=null
CONSTRUCTOR visibility:public <> (s:kotlin.String) returnType:<root>.MyContainer [primary]
VALUE_PARAMETER name:s index:0 type:kotlin.String
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.MyContainer) returnType:kotlin.String [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
@@ -41,27 +41,6 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
RETURN type=kotlin.Nothing from='public final fun copy (s: kotlin.String): <root>.MyContainer declared in <root>.MyContainer'
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
s: GET_VAR 's: kotlin.String declared in <root>.MyContainer.copy' type=kotlin.String origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="MyContainer("
CONST String type=kotlin.String value="s="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.MyContainer, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -96,6 +75,62 @@ 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 declared in <root>.MyContainer'
CONST Boolean type=kotlin.Boolean value=true
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="MyContainer("
CONST String type=kotlin.String value="s="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
CONST String type=kotlin.String value=")"
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.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with declared in kotlin' type=kotlin.String origin=null
<T>: kotlin.Int
<R>: kotlin.String
receiver: CONST Int type=kotlin.Int value=42
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<kotlin.Int, kotlin.String> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.String
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
VAR name:myContainer type:<root>.MyContainer [val]
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
s: CONST String type=kotlin.String value="fail"
CALL 'public final fun set ($context_receiver_0: kotlin.Int, index: kotlin.Int, value: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
$receiver: GET_VAR 'val myContainer: <root>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer 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 ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.String? declared in <root>' type=kotlin.String? origin=GET_ARRAY_ELEMENT
$receiver: GET_VAR 'val myContainer: <root>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer 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
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: GET_VAR 'val tmp_1: kotlin.String? declared in <root>.box.<anonymous>' type=kotlin.String? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST String type=kotlin.String value="fail"
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_1: kotlin.String? declared in <root>.box.<anonymous>' type=kotlin.String? origin=null
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
@@ -148,38 +183,3 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
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
<set-?>: GET_VAR 'value: kotlin.String declared in <root>.set' type=kotlin.String 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.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with declared in kotlin' type=kotlin.String origin=null
<T>: kotlin.Int
<R>: kotlin.String
receiver: CONST Int type=kotlin.Int value=42
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<kotlin.Int, kotlin.String> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.String
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
VAR name:myContainer type:<root>.MyContainer [val]
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
s: CONST String type=kotlin.String value="fail"
CALL 'public final fun set ($context_receiver_0: kotlin.Int, index: kotlin.Int, value: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
$receiver: GET_VAR 'val myContainer: <root>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer 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 ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.String? declared in <root>' type=kotlin.String? origin=GET_ARRAY_ELEMENT
$receiver: GET_VAR 'val myContainer: <root>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer 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
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: GET_VAR 'val tmp_1: kotlin.String? declared in <root>.box.<anonymous>' type=kotlin.String? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST String type=kotlin.String value="fail"
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_1: kotlin.String? declared in <root>.box.<anonymous>' type=kotlin.String? origin=null
@@ -1,15 +1,15 @@
data class MyContainer {
var s: String
field = s
get
set
constructor(s: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
var s: String
field = s
get
set
operator fun component1(): String {
return <this>.#s
}
@@ -18,14 +18,6 @@ data class MyContainer {
return MyContainer(s = s)
}
override fun toString(): String {
return "MyContainer(" + "s=" + <this>.#s + ")"
}
override fun hashCode(): Int {
return <this>.#s.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -40,6 +32,29 @@ data class MyContainer {
return true
}
override fun hashCode(): Int {
return <this>.#s.hashCode()
}
override fun toString(): String {
return "MyContainer(" + "s=" + <this>.#s + ")"
}
}
fun box(): String {
return with<Int, String>(receiver = 42, block = local fun Int.<anonymous>(): String {
val myContainer: MyContainer = MyContainer(s = "fail")
myContainer.set($context_receiver_0 = $this$with, index = 0, value = "OK")
return { // BLOCK
val tmp_1: String? = myContainer.get($context_receiver_0 = $this$with, index = 0)
when {
EQEQ(arg0 = tmp_1, arg1 = null) -> "fail"
else -> tmp_1
}
}
}
)
}
operator fun MyContainer.get($context_receiver_0: Int, index: Int): String? {
@@ -62,18 +77,3 @@ operator fun MyContainer.set($context_receiver_0: Int, index: Int, value: String
<this>.<set-s>(<set-?> = value)
}
fun box(): String {
return with<Int, String>(receiver = 42, block = local fun Int.<anonymous>(): String {
val myContainer: MyContainer = MyContainer(s = "fail")
myContainer.set($context_receiver_0 = $this$with, index = 0, value = "OK")
return { // BLOCK
val tmp_1: String? = myContainer.get($context_receiver_0 = $this$with, index = 0)
when {
EQEQ(arg0 = tmp_1, arg1 = null) -> "fail"
else -> tmp_1
}
}
}
)
}
@@ -1,11 +1,6 @@
FILE fqName:<root> fileName:/arrayAccessOperators.kt
CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyContainer
CONSTRUCTOR visibility:public <> (s:kotlin.String) returnType:<root>.MyContainer [primary]
VALUE_PARAMETER name:s index:0 type:kotlin.String
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:s visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private
EXPRESSION_BODY
@@ -25,6 +20,11 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.<set-s>' type=<root>.MyContainer origin=null
value: GET_VAR '<set-?>: kotlin.String declared in <root>.MyContainer.<set-s>' type=kotlin.String origin=null
CONSTRUCTOR visibility:public <> (s:kotlin.String) returnType:<root>.MyContainer [primary]
VALUE_PARAMETER name:s index:0 type:kotlin.String
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.MyContainer) returnType:kotlin.String [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
@@ -41,27 +41,6 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
RETURN type=kotlin.Nothing from='public final fun copy (s: kotlin.String): <root>.MyContainer declared in <root>.MyContainer'
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
s: GET_VAR 's: kotlin.String declared in <root>.MyContainer.copy' type=kotlin.String origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="MyContainer("
CONST String type=kotlin.String value="s="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.MyContainer, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -96,6 +75,62 @@ 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 declared in <root>.MyContainer'
CONST Boolean type=kotlin.Boolean value=true
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="MyContainer("
CONST String type=kotlin.String value="s="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
CONST String type=kotlin.String value=")"
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.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with declared in kotlin' type=kotlin.String origin=null
<T>: kotlin.Int
<R>: kotlin.String
receiver: CONST Int type=kotlin.Int value=42
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<kotlin.Int, kotlin.String> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.String
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
VAR name:myContainer type:<root>.MyContainer [val]
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
s: CONST String type=kotlin.String value="fail"
CALL 'public final fun set ($context_receiver_0: kotlin.Int, index: kotlin.Int, value: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
$receiver: GET_VAR 'val myContainer: <root>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer 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 ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.String? declared in <root>' type=kotlin.String? origin=GET_ARRAY_ELEMENT
$receiver: GET_VAR 'val myContainer: <root>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer 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
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: GET_VAR 'val tmp_1: kotlin.String? declared in <root>.box.<anonymous>' type=kotlin.String? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST String type=kotlin.String value="fail"
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_1: kotlin.String? declared in <root>.box.<anonymous>' type=kotlin.String? origin=null
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
@@ -148,38 +183,3 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
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
<set-?>: GET_VAR 'value: kotlin.String declared in <root>.set' type=kotlin.String 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.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with declared in kotlin' type=kotlin.String origin=null
<T>: kotlin.Int
<R>: kotlin.String
receiver: CONST Int type=kotlin.Int value=42
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<kotlin.Int, kotlin.String> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.String
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
VAR name:myContainer type:<root>.MyContainer [val]
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
s: CONST String type=kotlin.String value="fail"
CALL 'public final fun set ($context_receiver_0: kotlin.Int, index: kotlin.Int, value: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
$receiver: GET_VAR 'val myContainer: <root>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer 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 ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.String? declared in <root>' type=kotlin.String? origin=GET_ARRAY_ELEMENT
$receiver: GET_VAR 'val myContainer: <root>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer 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
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: GET_VAR 'val tmp_1: kotlin.String? declared in <root>.box.<anonymous>' type=kotlin.String? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST String type=kotlin.String value="fail"
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_1: kotlin.String? declared in <root>.box.<anonymous>' type=kotlin.String? origin=null
@@ -1,15 +1,15 @@
data class MyContainer {
var s: String
field = s
get
set
constructor(s: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
var s: String
field = s
get
set
operator fun component1(): String {
return <this>.#s
}
@@ -18,14 +18,6 @@ data class MyContainer {
return MyContainer(s = s)
}
override fun toString(): String {
return "MyContainer(" + "s=" + <this>.#s + ")"
}
override fun hashCode(): Int {
return <this>.#s.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -40,6 +32,29 @@ data class MyContainer {
return true
}
override fun hashCode(): Int {
return <this>.#s.hashCode()
}
override fun toString(): String {
return "MyContainer(" + "s=" + <this>.#s + ")"
}
}
fun box(): String {
return with<Int, String>(receiver = 42, block = local fun Int.<anonymous>(): String {
val myContainer: MyContainer = MyContainer(s = "fail")
myContainer.set($context_receiver_0 = $this$with, index = 0, value = "OK")
return { // BLOCK
val tmp_1: String? = myContainer.get($context_receiver_0 = $this$with, index = 0)
when {
EQEQ(arg0 = tmp_1, arg1 = null) -> "fail"
else -> tmp_1
}
}
}
)
}
operator fun MyContainer.get($context_receiver_0: Int, index: Int): String? {
@@ -62,17 +77,3 @@ operator fun MyContainer.set($context_receiver_0: Int, index: Int, value: String
<this>.<set-s>(<set-?> = value)
}
fun box(): String {
return with<Int, String>(receiver = 42, block = local fun Int.<anonymous>(): String {
val myContainer: MyContainer = MyContainer(s = "fail")
myContainer.set($context_receiver_0 = $this$with, index = 0, value = "OK")
return { // BLOCK
val tmp_1: String? = myContainer.get($context_receiver_0 = $this$with, index = 0)
when {
EQEQ(arg0 = tmp_1, arg1 = null) -> "fail"
else -> tmp_1
}
}
}
)
}
@@ -1,21 +1,16 @@
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]
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 <> ($context_receiver_0:<root>.Outer, arg:kotlin.Any) returnType:<root>.Inner [primary]
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.Outer
VALUE_PARAMETER name:arg index:1 type:kotlin.Any
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () 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
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 '$context_receiver_0: <root>.Outer declared in <root>.Inner.<init>' type=<root>.Outer origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN 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 declared in kotlin.Any
@@ -29,18 +24,6 @@ FILE fqName:<root> fileName:/class.kt
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 <> ($context_receiver_0:<root>.Outer, arg:kotlin.Any) returnType:<root>.Inner [primary]
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.Outer
VALUE_PARAMETER name:arg index:1 type:kotlin.Any
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () 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 '$context_receiver_0: <root>.Outer declared in <root>.Inner.<init>' type=<root>.Outer origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN name:bar visibility:public modality:FINAL <> ($this:<root>.Inner) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.Inner
BLOCK_BODY
@@ -48,6 +31,23 @@ FILE fqName:<root> fileName:/class.kt
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
CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer
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
CONSTRUCTOR visibility:public <> () returnType:<root>.Outer [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer 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 declared in kotlin.Any
@@ -1,16 +1,3 @@
class Outer {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Int
field = 1
get
}
class Inner {
private /* final field */ val contextReceiverField0: Outer
constructor($context_receiver_0: Outer, arg: Any) /* primary */ {
@@ -26,9 +13,23 @@ class Inner {
}
class Outer {
val x: Int
field = 1
get
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
fun f(outer: Outer) {
with<Outer, Inner>(receiver = outer, block = local fun Outer.<anonymous>(): Inner {
return Inner($context_receiver_0 = $this$with, arg = 3)
}
) /*~> Unit */
}
@@ -1,11 +1,21 @@
FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
PROPERTY name:operationScore visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-operationScore> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-operationScore> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-operationScore> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
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
CLASS CLASS name:Result modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Result
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.Result [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Result modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:i visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private
EXPRESSION_BODY
@@ -25,6 +35,11 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.<set-i>' type=<root>.Result origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.Result.<set-i>' type=kotlin.Int origin=null
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.Result [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Result modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Result) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
@@ -41,27 +56,6 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): <root>.Result declared in <root>.Result'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: GET_VAR 'i: kotlin.Int declared in <root>.Result.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Result("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Result'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.hashCode' type=<root>.Result origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Result, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -96,157 +90,27 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Result'
CONST Boolean type=kotlin.Boolean value=true
PROPERTY name:operationScore visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-operationScore> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-operationScore> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-operationScore> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Result'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.hashCode' type=<root>.Result origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.plusAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Result declared in <root>.plusAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$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>.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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int 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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.minusAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Result declared in <root>.minusAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$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>.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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun times (other: kotlin.Int): kotlin.Int 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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.timesAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Result declared in <root>.timesAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$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>.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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun div (other: kotlin.Int): kotlin.Int 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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.divAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Result declared in <root>.divAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$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>.divAssign' 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>.divAssign' type=<root>.Result origin=null
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Result("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
CONST String type=kotlin.String value=")"
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:result type:<root>.Result [val]
@@ -315,3 +179,139 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST String type=kotlin.String value="fail"
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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun div (other: kotlin.Int): kotlin.Int 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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.divAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Result declared in <root>.divAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$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>.divAssign' 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>.divAssign' type=<root>.Result origin=null
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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int 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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.minusAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Result declared in <root>.minusAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$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>.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: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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.plusAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Result declared in <root>.plusAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$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>.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: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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun times (other: kotlin.Int): kotlin.Int 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, $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:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.timesAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Result declared in <root>.timesAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$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>.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
@@ -1,15 +1,20 @@
var operationScore: Int
field = 0
get
set
data class Result {
var i: Int
field = i
get
set
constructor(i: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
var i: Int
field = i
get
set
operator fun component1(): Int {
return <this>.#i
}
@@ -18,14 +23,6 @@ data class Result {
return Result(i = i)
}
override fun toString(): String {
return "Result(" + "i=" + <this>.#i + ")"
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -40,51 +37,14 @@ data class Result {
return true
}
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
var operationScore: Int
field = 0
get
set
override fun toString(): String {
return "Result(" + "i=" + <this>.#i + ")"
}
operator fun Result.plus($context_receiver_0: Int, other: Result): Result {
<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($context_receiver_0: Int, other: Result) {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
<this>.<set-i>(<set-?> = <this>.<get-i>().plus(other = other.<get-i>()))
}
operator fun Result.minus($context_receiver_0: Int, other: Result): Result {
<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($context_receiver_0: Int, other: Result) {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
<this>.<set-i>(<set-?> = <this>.<get-i>().minus(other = other.<get-i>()))
}
operator fun Result.times($context_receiver_0: Int, other: Result): Result {
<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($context_receiver_0: Int, other: Result) {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
<this>.<set-i>(<set-?> = <this>.<get-i>().times(other = other.<get-i>()))
}
operator fun Result.div($context_receiver_0: Int, other: Result): Result {
<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($context_receiver_0: Int, other: Result) {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
<this>.<set-i>(<set-?> = <this>.<get-i>().div(other = other.<get-i>()))
}
fun box(): String {
@@ -105,3 +65,43 @@ fun box(): String {
}
}
operator fun Result.div($context_receiver_0: Int, other: Result): Result {
<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($context_receiver_0: Int, other: Result) {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
<this>.<set-i>(<set-?> = <this>.<get-i>().div(other = other.<get-i>()))
}
operator fun Result.minus($context_receiver_0: Int, other: Result): Result {
<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($context_receiver_0: Int, other: Result) {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
<this>.<set-i>(<set-?> = <this>.<get-i>().minus(other = other.<get-i>()))
}
operator fun Result.plus($context_receiver_0: Int, other: Result): Result {
<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($context_receiver_0: Int, other: Result) {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
<this>.<set-i>(<set-?> = <this>.<get-i>().plus(other = other.<get-i>()))
}
operator fun Result.times($context_receiver_0: Int, other: Result): Result {
<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($context_receiver_0: Int, other: Result) {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
<this>.<set-i>(<set-?> = <this>.<get-i>().times(other = other.<get-i>()))
}
@@ -1,11 +1,21 @@
FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
PROPERTY name:operationScore visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-operationScore> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-operationScore> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-operationScore> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
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
CLASS CLASS name:Result modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Result
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.Result [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Result modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:i visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private
EXPRESSION_BODY
@@ -25,6 +35,11 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.<set-i>' type=<root>.Result origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.Result.<set-i>' type=kotlin.Int origin=null
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.Result [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Result modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Result) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
@@ -41,27 +56,6 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): <root>.Result declared in <root>.Result'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: GET_VAR 'i: kotlin.Int declared in <root>.Result.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Result("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Result'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.hashCode' type=<root>.Result origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Result, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -96,177 +90,27 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Result'
CONST Boolean type=kotlin.Boolean value=true
PROPERTY name:operationScore visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-operationScore> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-operationScore> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-operationScore> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Result'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.hashCode' type=<root>.Result origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
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, $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:$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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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, $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:$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 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 '$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
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=PLUSEQ
$this: GET_VAR 'val tmp_1: <root>.Result declared in <root>.plusAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'val tmp_1: <root>.Result 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, $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:$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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int 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, $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:$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 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 '$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
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=MINUSEQ
$this: GET_VAR 'val tmp_2: <root>.Result declared in <root>.minusAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MINUSEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=MINUSEQ
$this: GET_VAR 'val tmp_2: <root>.Result 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, $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:$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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun times (other: kotlin.Int): kotlin.Int 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, $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:$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 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 '$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
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=MULTEQ
$this: GET_VAR 'val tmp_3: <root>.Result declared in <root>.timesAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MULTEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=MULTEQ
$this: GET_VAR 'val tmp_3: <root>.Result 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, $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:$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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun div (other: kotlin.Int): kotlin.Int 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, $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:$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 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 '$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
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=DIVEQ
$this: GET_VAR 'val tmp_4: <root>.Result declared in <root>.divAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=DIVEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=DIVEQ
$this: GET_VAR 'val tmp_4: <root>.Result declared in <root>.divAssign' 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>.divAssign' type=<root>.Result origin=null
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Result("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
CONST String type=kotlin.String value=")"
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:result type:<root>.Result [val]
@@ -335,3 +179,159 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST String type=kotlin.String value="fail"
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:$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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun div (other: kotlin.Int): kotlin.Int 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, $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:$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 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 '$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_1 type:<root>.Result [val]
GET_VAR '<this>: <root>.Result declared in <root>.divAssign' type=<root>.Result origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=DIVEQ
$this: GET_VAR 'val tmp_1: <root>.Result declared in <root>.divAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=DIVEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=DIVEQ
$this: GET_VAR 'val tmp_1: <root>.Result declared in <root>.divAssign' 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>.divAssign' type=<root>.Result origin=null
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:$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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int 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, $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:$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 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 '$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
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=MINUSEQ
$this: GET_VAR 'val tmp_2: <root>.Result declared in <root>.minusAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MINUSEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=MINUSEQ
$this: GET_VAR 'val tmp_2: <root>.Result 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: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:$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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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, $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:$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 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 '$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_3 type:<root>.Result [val]
GET_VAR '<this>: <root>.Result declared in <root>.plusAssign' type=<root>.Result origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=PLUSEQ
$this: GET_VAR 'val tmp_3: <root>.Result declared in <root>.plusAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'val tmp_3: <root>.Result 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: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:$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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun times (other: kotlin.Int): kotlin.Int 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, $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:$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 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 '$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_4 type:<root>.Result [val]
GET_VAR '<this>: <root>.Result declared in <root>.timesAssign' type=<root>.Result origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=MULTEQ
$this: GET_VAR 'val tmp_4: <root>.Result declared in <root>.timesAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MULTEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=MULTEQ
$this: GET_VAR 'val tmp_4: <root>.Result 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
@@ -1,15 +1,20 @@
var operationScore: Int
field = 0
get
set
data class Result {
var i: Int
field = i
get
set
constructor(i: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
var i: Int
field = i
get
set
operator fun component1(): Int {
return <this>.#i
}
@@ -18,14 +23,6 @@ data class Result {
return Result(i = i)
}
override fun toString(): String {
return "Result(" + "i=" + <this>.#i + ")"
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -40,27 +37,48 @@ data class Result {
return true
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
override fun toString(): String {
return "Result(" + "i=" + <this>.#i + ")"
}
}
var operationScore: Int
field = 0
get
set
fun box(): String {
val result: Result = Result(i = 0)
with<Int, Unit>(receiver = 1, block = local fun Int.<anonymous>() {
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 {
when {
EQEQ(arg0 = result.<get-i>(), arg1 = 1) -> EQEQ(arg0 = <get-operationScore>(), arg1 = 8)
else -> false
} -> "OK"
else -> "fail"
}
}
operator fun Result.plus($context_receiver_0: Int, other: Result): Result {
operator fun Result.div($context_receiver_0: Int, other: Result): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
return Result(i = <this>.<get-i>().plus(other = other.<get-i>()))
return Result(i = <this>.<get-i>().div(other = other.<get-i>()))
}
operator fun Result.plusAssign($context_receiver_0: Int, other: Result) {
operator fun Result.divAssign($context_receiver_0: Int, other: Result) {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
{ // BLOCK
val tmp_1: Result = <this>
tmp_1.<set-i>(<set-?> = tmp_1.<get-i>().plus(other = other.<get-i>()))
tmp_1.<set-i>(<set-?> = tmp_1.<get-i>().div(other = other.<get-i>()))
}
}
@@ -81,6 +99,23 @@ operator fun Result.minusAssign($context_receiver_0: Int, other: Result) {
}
}
operator fun Result.plus($context_receiver_0: Int, other: Result): Result {
{ // BLOCK
<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($context_receiver_0: Int, other: Result) {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
{ // BLOCK
val tmp_3: Result = <this>
tmp_3.<set-i>(<set-?> = tmp_3.<get-i>().plus(other = other.<get-i>()))
}
}
operator fun Result.times($context_receiver_0: Int, other: Result): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
@@ -89,46 +124,12 @@ operator fun Result.times($context_receiver_0: Int, other: Result): Result {
}
operator fun Result.timesAssign($context_receiver_0: Int, other: Result) {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
{ // BLOCK
val tmp_3: Result = <this>
tmp_3.<set-i>(<set-?> = tmp_3.<get-i>().times(other = other.<get-i>()))
}
}
operator fun Result.div($context_receiver_0: Int, other: Result): Result {
{ // BLOCK
<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($context_receiver_0: Int, other: Result) {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
{ // BLOCK
val tmp_4: Result = <this>
tmp_4.<set-i>(<set-?> = tmp_4.<get-i>().div(other = other.<get-i>()))
tmp_4.<set-i>(<set-?> = tmp_4.<get-i>().times(other = other.<get-i>()))
}
}
fun box(): String {
val result: Result = Result(i = 0)
with<Int, Unit>(receiver = 1, block = local fun Int.<anonymous>() {
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 {
when {
EQEQ(arg0 = result.<get-i>(), arg1 = 1) -> EQEQ(arg0 = <get-operationScore>(), arg1 = 8)
else -> false
} -> "OK"
else -> "fail"
}
}
@@ -5,11 +5,6 @@ FILE fqName:<root> fileName:/contextReceiverMethod.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Context modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.Context) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.Int declared in <root>.Context'
CONST Int type=kotlin.Int value=1
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 declared in kotlin.Any
@@ -23,6 +18,11 @@ FILE fqName:<root> fileName:/contextReceiverMethod.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>.Context) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.Int declared in <root>.Context'
CONST Int type=kotlin.Int value=1
CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test
FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.Context visibility:private [final]
@@ -34,18 +34,6 @@ FILE fqName:<root> fileName:/contextReceiverMethod.kt
receiver: GET_VAR '<this>: <root>.Test declared in <root>.Test' type=<root>.Test origin=null
value: GET_VAR '$context_receiver_0: <root>.Context declared in <root>.Test.<init>' type=<root>.Context origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.Test) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.Test
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.Int declared in <root>.Test'
CONST Int type=kotlin.Int value=2
FUN name:bar visibility:public modality:FINAL <> ($this:<root>.Test) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Test
BLOCK_BODY
VAR name:x type:kotlin.Int [val]
CALL 'public final fun foo (): kotlin.Int declared in <root>.Context' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.Context visibility:private [final]' type=<root>.Context origin=null
receiver: GET_VAR '<this>: <root>.Test declared in <root>.Test.bar' type=<root>.Test 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 declared in kotlin.Any
@@ -59,3 +47,15 @@ FILE fqName:<root> fileName:/contextReceiverMethod.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:bar visibility:public modality:FINAL <> ($this:<root>.Test) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Test
BLOCK_BODY
VAR name:x type:kotlin.Int [val]
CALL 'public final fun foo (): kotlin.Int declared in <root>.Context' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.Context visibility:private [final]' type=<root>.Context origin=null
receiver: GET_VAR '<this>: <root>.Test declared in <root>.Test.bar' type=<root>.Test origin=null
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.Test) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.Test
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.Int declared in <root>.Test'
CONST Int type=kotlin.Int value=2
@@ -20,12 +20,13 @@ class Test {
}
fun foo(): Int {
return 2
}
fun bar() {
val x: Int = <this>.#contextReceiverField0.foo()
}
fun foo(): Int {
return 2
}
}
@@ -1,17 +1,4 @@
FILE fqName:<root> fileName:/contextualFunctionConversion.kt
FUN name:withContext visibility:public modality:FINAL <> (f:kotlin.Function1<kotlin.String, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:f index:0 type:kotlin.Function1<kotlin.String, kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withContext (f: kotlin.Function1<kotlin.String, kotlin.String>): kotlin.String declared in <root>'
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.String origin=INVOKE
$this: GET_VAR 'f: kotlin.Function1<kotlin.String, kotlin.String> declared in <root>.withContext' type=kotlin.Function1<kotlin.String, kotlin.String> origin=VARIABLE_AS_FUNCTION
p1: CONST String type=kotlin.String value="OK"
FUN name:callWithContext visibility:public modality:FINAL <> (f:kotlin.Function1<kotlin.String, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:f index:0 type:kotlin.Function1<kotlin.String, kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun callWithContext (f: kotlin.Function1<kotlin.String, kotlin.String>): kotlin.String declared in <root>'
CALL 'public final fun withContext (f: kotlin.Function1<kotlin.String, kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
f: GET_VAR 'f: kotlin.Function1<kotlin.String, kotlin.String> declared in <root>.callWithContext' type=kotlin.Function1<kotlin.String, kotlin.String> 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>'
@@ -22,3 +9,16 @@ FILE fqName:<root> fileName:/contextualFunctionConversion.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (s: kotlin.String): kotlin.String declared in <root>.box'
GET_VAR 's: kotlin.String declared in <root>.box.<anonymous>' type=kotlin.String origin=null
FUN name:callWithContext visibility:public modality:FINAL <> (f:kotlin.Function1<kotlin.String, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:f index:0 type:kotlin.Function1<kotlin.String, kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun callWithContext (f: kotlin.Function1<kotlin.String, kotlin.String>): kotlin.String declared in <root>'
CALL 'public final fun withContext (f: kotlin.Function1<kotlin.String, kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
f: GET_VAR 'f: kotlin.Function1<kotlin.String, kotlin.String> declared in <root>.callWithContext' type=kotlin.Function1<kotlin.String, kotlin.String> origin=null
FUN name:withContext visibility:public modality:FINAL <> (f:kotlin.Function1<kotlin.String, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:f index:0 type:kotlin.Function1<kotlin.String, kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withContext (f: kotlin.Function1<kotlin.String, kotlin.String>): kotlin.String declared in <root>'
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.String origin=INVOKE
$this: GET_VAR 'f: kotlin.Function1<kotlin.String, kotlin.String> declared in <root>.withContext' type=kotlin.Function1<kotlin.String, kotlin.String> origin=VARIABLE_AS_FUNCTION
p1: CONST String type=kotlin.String value="OK"
@@ -1,14 +1,15 @@
fun withContext(f: Function1<String, String>): String {
return f.invoke(p1 = "OK")
}
fun callWithContext(f: Function1<String, String>): String {
return withContext(f = f)
}
fun box(): String {
return callWithContext(f = local fun <anonymous>(s: String): String {
return s
}
)
}
fun callWithContext(f: Function1<String, String>): String {
return withContext(f = f)
}
fun withContext(f: Function1<String, String>): String {
return f.invoke(p1 = "OK")
}
@@ -1,17 +1,4 @@
FILE fqName:<root> fileName:/contextualFunctionConversion.kt
FUN name:withContext visibility:public modality:FINAL <> (f:@[ContextFunctionTypeParams(count = 1)] kotlin.Function1<kotlin.String, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:f index:0 type:@[ContextFunctionTypeParams(count = 1)] kotlin.Function1<kotlin.String, kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withContext (f: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1<kotlin.String, kotlin.String>): kotlin.String declared in <root>'
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.String origin=INVOKE
$this: GET_VAR 'f: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1<kotlin.String, kotlin.String> declared in <root>.withContext' type=@[ContextFunctionTypeParams(count = 1)] kotlin.Function1<kotlin.String, kotlin.String> origin=VARIABLE_AS_FUNCTION
p1: CONST String type=kotlin.String value="OK"
FUN name:callWithContext visibility:public modality:FINAL <> (f:kotlin.Function1<kotlin.String, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:f index:0 type:kotlin.Function1<kotlin.String, kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun callWithContext (f: kotlin.Function1<kotlin.String, kotlin.String>): kotlin.String declared in <root>'
CALL 'public final fun withContext (f: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1<kotlin.String, kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
f: GET_VAR 'f: kotlin.Function1<kotlin.String, kotlin.String> declared in <root>.callWithContext' type=kotlin.Function1<kotlin.String, kotlin.String> 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>'
@@ -22,3 +9,16 @@ FILE fqName:<root> fileName:/contextualFunctionConversion.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (s: kotlin.String): kotlin.String declared in <root>.box'
GET_VAR 's: kotlin.String declared in <root>.box.<anonymous>' type=kotlin.String origin=null
FUN name:callWithContext visibility:public modality:FINAL <> (f:kotlin.Function1<kotlin.String, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:f index:0 type:kotlin.Function1<kotlin.String, kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun callWithContext (f: kotlin.Function1<kotlin.String, kotlin.String>): kotlin.String declared in <root>'
CALL 'public final fun withContext (f: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1<kotlin.String, kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
f: GET_VAR 'f: kotlin.Function1<kotlin.String, kotlin.String> declared in <root>.callWithContext' type=kotlin.Function1<kotlin.String, kotlin.String> origin=null
FUN name:withContext visibility:public modality:FINAL <> (f:@[ContextFunctionTypeParams(count = 1)] kotlin.Function1<kotlin.String, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:f index:0 type:@[ContextFunctionTypeParams(count = 1)] kotlin.Function1<kotlin.String, kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withContext (f: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1<kotlin.String, kotlin.String>): kotlin.String declared in <root>'
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.String origin=INVOKE
$this: GET_VAR 'f: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1<kotlin.String, kotlin.String> declared in <root>.withContext' type=@[ContextFunctionTypeParams(count = 1)] kotlin.Function1<kotlin.String, kotlin.String> origin=VARIABLE_AS_FUNCTION
p1: CONST String type=kotlin.String value="OK"
@@ -1,14 +1,15 @@
fun withContext(f: @ContextFunctionTypeParams(count = 1) Function1<String, String>): String {
return f.invoke(p1 = "OK")
}
fun callWithContext(f: Function1<String, String>): String {
return withContext(f = f)
}
fun box(): String {
return callWithContext(f = local fun <anonymous>(s: String): String {
return s
}
)
}
fun callWithContext(f: Function1<String, String>): String {
return withContext(f = f)
}
fun withContext(f: @ContextFunctionTypeParams(count = 1) Function1<String, String>): String {
return f.invoke(p1 = "OK")
}
@@ -1,81 +1,6 @@
FILE fqName:<root> fileName:/contextualInlineCall.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> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Context modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN name:c visibility:public modality:FINAL <> ($this:<root>.Context) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun c (): kotlin.Int declared in <root>.Context'
CONST Int type=kotlin.Int value=1
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 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:testInline visibility:public modality:FINAL <> ($context_receiver_0:<root>.Context) returnType:kotlin.Int [inline]
contextReceiverParametersCount: 1
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInline ($context_receiver_0: <root>.Context): kotlin.Int declared in <root>'
CALL 'public final fun c (): kotlin.Int declared in <root>.Context' type=kotlin.Int origin=null
$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:$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 ($context_receiver_0: <root>.Context, i: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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 '$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:$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 ($context_receiver_0: <root>.Context, i: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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 '$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:$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 ($context_receiver_0: <root>.Context, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.testInlineWithExtensionAndMultipleArgs' type=kotlin.Int origin=null
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 '$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]
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () 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:kotlin.Any? visibility:private [final]
EXPRESSION_BODY
@@ -87,6 +12,11 @@ FILE fqName:<root> fileName:/contextualInlineCall.kt
RETURN type=kotlin.Nothing from='public final fun <get-a> (): kotlin.Any? declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-a>' type=<root>.A origin=null
CONSTRUCTOR visibility:public <> (a:kotlin.Any?) returnType:<root>.A [primary]
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A 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 declared in kotlin.Any
@@ -100,38 +30,30 @@ 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, $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:$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
VALUE_PARAMETER name:i2 index:3 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=2
BLOCK_BODY
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 declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.testInlineWithExtensionAndMultipleContextsAndArgs' type=kotlin.Int origin=null
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 '$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 '$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
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Int type=kotlin.Int value=1
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> () 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 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:c visibility:public modality:FINAL <> ($this:<root>.Context) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun c (): kotlin.Int declared in <root>.Context'
CONST Int type=kotlin.Int value=1
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>'
@@ -206,3 +128,81 @@ FILE fqName:<root> fileName:/contextualInlineCall.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST String type=kotlin.String value="fail"
FUN name:testInline visibility:public modality:FINAL <> ($context_receiver_0:<root>.Context) returnType:kotlin.Int [inline]
contextReceiverParametersCount: 1
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInline ($context_receiver_0: <root>.Context): kotlin.Int declared in <root>'
CALL 'public final fun c (): kotlin.Int declared in <root>.Context' type=kotlin.Int origin=null
$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:$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 ($context_receiver_0: <root>.Context, i: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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 '$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:$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 ($context_receiver_0: <root>.Context, i: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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 '$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:$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 ($context_receiver_0: <root>.Context, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.testInlineWithExtensionAndMultipleArgs' type=kotlin.Int origin=null
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 '$context_receiver_0: <root>.Context declared in <root>.testInlineWithExtensionAndMultipleArgs' type=<root>.Context origin=null
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:$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
VALUE_PARAMETER name:i2 index:3 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=2
BLOCK_BODY
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 declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.testInlineWithExtensionAndMultipleContextsAndArgs' type=kotlin.Int origin=null
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 '$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 '$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
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Int type=kotlin.Int value=1
@@ -1,3 +1,16 @@
class A {
val a: Any?
field = a
get
constructor(a: Any?) /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class Context {
constructor() /* primary */ {
super/*Any*/()
@@ -11,42 +24,6 @@ class Context {
}
inline fun testInline($context_receiver_0: Context): Int {
return $context_receiver_0.c()
}
inline fun testInlineWithArg($context_receiver_0: Context, i: Int): Int {
return i.plus(other = $context_receiver_0.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($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 {
constructor(a: Any?) /* primary */ {
super/*Any*/()
/* <init>() */
}
val a: Any?
field = a
get
}
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
})
}
fun box(): String {
return with<Context, Nothing>(receiver = Context(), block = local fun Context.<anonymous>(): Nothing {
var result: Int = 0
@@ -67,3 +44,26 @@ fun box(): String {
)
}
inline fun testInline($context_receiver_0: Context): Int {
return $context_receiver_0.c()
}
inline fun testInlineWithArg($context_receiver_0: Context, i: Int): Int {
return i.plus(other = $context_receiver_0.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($context_receiver_0: Context, i1: Int, i2: Int): Int {
return <this>.plus(other = i1).plus(other = i2).plus(other = $context_receiver_0.c())
}
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
})
}
@@ -1,81 +1,6 @@
FILE fqName:<root> fileName:/contextualInlineCall.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> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Context modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN name:c visibility:public modality:FINAL <> ($this:<root>.Context) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun c (): kotlin.Int declared in <root>.Context'
CONST Int type=kotlin.Int value=1
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 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:testInline visibility:public modality:FINAL <> ($context_receiver_0:<root>.Context) returnType:kotlin.Int [inline]
contextReceiverParametersCount: 1
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInline ($context_receiver_0: <root>.Context): kotlin.Int declared in <root>'
CALL 'public final fun c (): kotlin.Int declared in <root>.Context' type=kotlin.Int origin=null
$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:$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 ($context_receiver_0: <root>.Context, i: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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 '$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:$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 ($context_receiver_0: <root>.Context, i: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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 '$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:$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 ($context_receiver_0: <root>.Context, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.testInlineWithExtensionAndMultipleArgs' type=kotlin.Int origin=null
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 '$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]
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () 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:kotlin.Any? visibility:private [final]
EXPRESSION_BODY
@@ -87,6 +12,11 @@ FILE fqName:<root> fileName:/contextualInlineCall.kt
RETURN type=kotlin.Nothing from='public final fun <get-a> (): kotlin.Any? declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-a>' type=<root>.A origin=null
CONSTRUCTOR visibility:public <> (a:kotlin.Any?) returnType:<root>.A [primary]
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A 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 declared in kotlin.Any
@@ -100,38 +30,30 @@ 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, $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:$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
VALUE_PARAMETER name:i2 index:3 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=2
BLOCK_BODY
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 declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.testInlineWithExtensionAndMultipleContextsAndArgs' type=kotlin.Int origin=null
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 '$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 '$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
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Int type=kotlin.Int value=1
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> () 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 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:c visibility:public modality:FINAL <> ($this:<root>.Context) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun c (): kotlin.Int declared in <root>.Context'
CONST Int type=kotlin.Int value=1
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>'
@@ -206,3 +128,81 @@ FILE fqName:<root> fileName:/contextualInlineCall.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST String type=kotlin.String value="fail"
FUN name:testInline visibility:public modality:FINAL <> ($context_receiver_0:<root>.Context) returnType:kotlin.Int [inline]
contextReceiverParametersCount: 1
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.Context
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInline ($context_receiver_0: <root>.Context): kotlin.Int declared in <root>'
CALL 'public final fun c (): kotlin.Int declared in <root>.Context' type=kotlin.Int origin=null
$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:$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 ($context_receiver_0: <root>.Context, i: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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 '$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:$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 ($context_receiver_0: <root>.Context, i: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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 '$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:$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 ($context_receiver_0: <root>.Context, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.testInlineWithExtensionAndMultipleArgs' type=kotlin.Int origin=null
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 '$context_receiver_0: <root>.Context declared in <root>.testInlineWithExtensionAndMultipleArgs' type=<root>.Context origin=null
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:$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
VALUE_PARAMETER name:i2 index:3 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=2
BLOCK_BODY
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 declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.testInlineWithExtensionAndMultipleContextsAndArgs' type=kotlin.Int origin=null
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 '$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 '$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
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Int type=kotlin.Int value=1
@@ -1,3 +1,16 @@
class A {
val a: Any?
field = a
get
constructor(a: Any?) /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class Context {
constructor() /* primary */ {
super/*Any*/()
@@ -11,42 +24,6 @@ class Context {
}
inline fun testInline($context_receiver_0: Context): Int {
return $context_receiver_0.c()
}
inline fun testInlineWithArg($context_receiver_0: Context, i: Int): Int {
return i.plus(other = $context_receiver_0.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($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 {
constructor(a: Any?) /* primary */ {
super/*Any*/()
/* <init>() */
}
val a: Any?
field = a
get
}
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
})
}
fun box(): String {
return with<Context, Nothing>(receiver = Context(), block = local fun Context.<anonymous>(): Nothing {
var result: Int = 0
@@ -66,3 +43,27 @@ fun box(): String {
}
)
}
inline fun testInline($context_receiver_0: Context): Int {
return $context_receiver_0.c()
}
inline fun testInlineWithArg($context_receiver_0: Context, i: Int): Int {
return i.plus(other = $context_receiver_0.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($context_receiver_0: Context, i1: Int, i2: Int): Int {
return <this>.plus(other = i1).plus(other = i2).plus(other = $context_receiver_0.c())
}
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
})
}
@@ -1,11 +1,6 @@
FILE fqName:<root> fileName:/contextualPrimaryConstructorWithParams.kt
CLASS CLASS name:O modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.O
CONSTRUCTOR visibility:public <> (o:kotlin.String) returnType:<root>.O [primary]
VALUE_PARAMETER name:o index:0 type:kotlin.String
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () 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
@@ -17,6 +12,11 @@ FILE fqName:<root> fileName:/contextualPrimaryConstructorWithParams.kt
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
CONSTRUCTOR visibility:public <> (o:kotlin.String) returnType:<root>.O [primary]
VALUE_PARAMETER name:o index:0 type:kotlin.String
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:O 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 declared in kotlin.Any
@@ -33,15 +33,6 @@ FILE fqName:<root> fileName:/contextualPrimaryConstructorWithParams.kt
CLASS CLASS name:OK modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.OK
FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.O visibility:private [final]
CONSTRUCTOR visibility:public <> ($context_receiver_0:<root>.O, k:kotlin.String) returnType:<root>.OK [primary]
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.O
VALUE_PARAMETER name:k index:1 type:kotlin.String
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
SET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.O visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.OK declared in <root>.OK' type=<root>.OK origin=null
value: GET_VAR '$context_receiver_0: <root>.O declared in <root>.OK.<init>' type=<root>.O origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:OK 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
@@ -69,6 +60,15 @@ FILE fqName:<root> fileName:/contextualPrimaryConstructorWithParams.kt
RETURN type=kotlin.Nothing from='public final fun <get-result> (): kotlin.String declared in <root>.OK'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:result type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.OK declared in <root>.OK.<get-result>' type=<root>.OK origin=null
CONSTRUCTOR visibility:public <> ($context_receiver_0:<root>.O, k:kotlin.String) returnType:<root>.OK [primary]
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.O
VALUE_PARAMETER name:k index:1 type:kotlin.String
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
SET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.O visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.OK declared in <root>.OK' type=<root>.OK origin=null
value: GET_VAR '$context_receiver_0: <root>.O declared in <root>.OK.<init>' type=<root>.O origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:OK 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 declared in kotlin.Any
@@ -1,25 +1,18 @@
class O {
val o: String
field = o
get
constructor(o: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
val o: String
field = o
get
}
class OK {
private /* final field */ val contextReceiverField0: O
constructor($context_receiver_0: O, k: String) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = $context_receiver_0
/* <init>() */
}
val k: String
field = k
get
@@ -28,6 +21,13 @@ class OK {
field = <this>.#contextReceiverField0.<get-o>().plus(other = <this>.<get-k>())
get
constructor($context_receiver_0: O, k: String) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = $context_receiver_0
/* <init>() */
}
}
fun box(): String {
@@ -37,3 +37,4 @@ fun box(): String {
}
)
}
@@ -16,10 +16,6 @@ FILE fqName:<root> fileName:/delegatedPropertiesOperators.kt
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-operationScore>' type=kotlin.Int origin=null
CLASS CLASS name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Delegate
CONSTRUCTOR visibility:public <> () returnType:<root>.Delegate [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:delegateValue visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:delegateValue type:kotlin.String visibility:private
EXPRESSION_BODY
@@ -39,6 +35,23 @@ 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
CONSTRUCTOR visibility:public <> () returnType:<root>.Delegate [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Delegate 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 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: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
@@ -68,30 +81,9 @@ FILE fqName:<root> fileName:/delegatedPropertiesOperators.kt
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
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 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:Result modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Result
FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:kotlin.Int visibility:private [final]
CONSTRUCTOR visibility:public <> ($context_receiver_0:kotlin.Int) returnType:<root>.Result [primary]
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
SET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result' type=<root>.Result origin=null
value: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.Result.<init>' type=kotlin.Int origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Result modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:s visibility:public modality:FINAL [delegated,var]
FIELD PROPERTY_DELEGATE name:s$delegate type:<root>.Delegate visibility:private [final]
EXPRESSION_BODY
@@ -122,6 +114,14 @@ FILE fqName:<root> fileName:/delegatedPropertiesOperators.kt
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' 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
value: GET_VAR '<set-?>: kotlin.String declared in <root>.Result.<set-s>' type=kotlin.String origin=null
CONSTRUCTOR visibility:public <> ($context_receiver_0:kotlin.Int) returnType:<root>.Result [primary]
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
SET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result' type=<root>.Result origin=null
value: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.Result.<init>' type=kotlin.Int origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Result 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 declared in kotlin.Any
@@ -4,17 +4,17 @@ var operationScore: Int
set
class Delegate {
var delegateValue: String
field = "fail"
get
set
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
var delegateValue: String
field = "fail"
get
set
operator fun getValue($context_receiver_0: Int, thisRef: Any?, property: KProperty<*>): String {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return <this>.<get-delegateValue>()
@@ -29,13 +29,6 @@ class Delegate {
class Result {
private /* final field */ val contextReceiverField0: Int
constructor($context_receiver_0: Int) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = $context_receiver_0
/* <init>() */
}
var s: String /* by */
field = Delegate()
get(): String {
@@ -45,6 +38,13 @@ class Result {
return <this>.#s$delegate.setValue($context_receiver_0 = <this>.#contextReceiverField0, thisRef = <this>, property = Result::s, value = <set-?>)
}
constructor($context_receiver_0: Int) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = $context_receiver_0
/* <init>() */
}
}
fun box(): String {
@@ -59,3 +59,4 @@ fun box(): String {
else -> "fail"
}
}
@@ -16,10 +16,6 @@ FILE fqName:<root> fileName:/delegatedPropertiesOperators.kt
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-operationScore>' type=kotlin.Int origin=null
CLASS CLASS name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Delegate
CONSTRUCTOR visibility:public <> () returnType:<root>.Delegate [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:delegateValue visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:delegateValue type:kotlin.String visibility:private
EXPRESSION_BODY
@@ -39,6 +35,23 @@ 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
CONSTRUCTOR visibility:public <> () returnType:<root>.Delegate [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Delegate 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 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: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
@@ -70,30 +83,9 @@ FILE fqName:<root> fileName:/delegatedPropertiesOperators.kt
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
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 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:Result modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Result
FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:kotlin.Int visibility:private [final]
CONSTRUCTOR visibility:public <> ($context_receiver_0:kotlin.Int) returnType:<root>.Result [primary]
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
SET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result' type=<root>.Result origin=null
value: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.Result.<init>' type=kotlin.Int origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Result modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:s visibility:public modality:FINAL [delegated,var]
FIELD PROPERTY_DELEGATE name:s$delegate type:<root>.Delegate visibility:private [final]
EXPRESSION_BODY
@@ -124,6 +116,14 @@ FILE fqName:<root> fileName:/delegatedPropertiesOperators.kt
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' 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
value: GET_VAR '<set-?>: kotlin.String declared in <root>.Result.<set-s>' type=kotlin.String origin=null
CONSTRUCTOR visibility:public <> ($context_receiver_0:kotlin.Int) returnType:<root>.Result [primary]
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
SET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result' type=<root>.Result origin=null
value: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.Result.<init>' type=kotlin.Int origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Result 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 declared in kotlin.Any
@@ -4,17 +4,17 @@ var operationScore: Int
set
class Delegate {
var delegateValue: String
field = "fail"
get
set
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
var delegateValue: String
field = "fail"
get
set
operator fun getValue($context_receiver_0: Int, thisRef: Any?, property: KProperty<*>): String {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
@@ -33,13 +33,6 @@ class Delegate {
class Result {
private /* final field */ val contextReceiverField0: Int
constructor($context_receiver_0: Int) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = $context_receiver_0
/* <init>() */
}
var s: String /* by */
field = Delegate()
get(): String {
@@ -49,6 +42,13 @@ class Result {
return <this>.#s$delegate.setValue($context_receiver_0 = <this>.#contextReceiverField0, thisRef = <this>, property = Result::s, value = <set-?>)
}
constructor($context_receiver_0: Int) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = $context_receiver_0
/* <init>() */
}
}
fun box(): String {
@@ -63,3 +63,4 @@ fun box(): String {
else -> "fail"
}
}
@@ -1,60 +1,10 @@
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 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, $context_receiver_0:<root>.Canvas) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.Shape
contextReceiverParametersCount: 1
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 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> () 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, $context_receiver_0:<root>.Canvas) returnType:kotlin.String
overridden:
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:$context_receiver_0 index:0 type:<root>.Canvas
BLOCK_BODY
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 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 '$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 declared in <root>.Shape
@@ -68,12 +18,58 @@ FILE fqName:<root> fileName:/canvas.kt
overridden:
public open fun toString (): kotlin.String declared in <root>.Shape
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:draw visibility:public modality:OPEN <> ($this:<root>.Circle, $context_receiver_0:<root>.Canvas) returnType:kotlin.String
overridden:
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:$context_receiver_0 index:0 type:<root>.Canvas
BLOCK_BODY
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 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 '$context_receiver_0: <root>.Canvas declared in <root>.Circle.draw' type=<root>.Canvas origin=null
CLASS INTERFACE name:Canvas modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER 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 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: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
CLASS INTERFACE name:Shape modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Shape
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 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: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:$context_receiver_0 index:0 type:<root>.Canvas
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> () 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
@@ -89,6 +85,10 @@ FILE fqName:<root> fileName:/canvas.kt
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
CONSTRUCTOR visibility:private <> () returnType:<root>.MyCanvas [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:MyCanvas modality:FINAL visibility:public superTypes:[<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 declared in <root>.Canvas
@@ -1,14 +1,3 @@
interface Canvas {
abstract val suffix: String
abstract get
}
interface Shape {
abstract fun draw($context_receiver_0: Canvas): String
}
class Circle : Shape {
constructor() /* primary */ {
super/*Any*/()
@@ -22,17 +11,28 @@ class Circle : Shape {
}
interface Canvas {
abstract val suffix: String
abstract get
}
interface Shape {
abstract fun draw($context_receiver_0: Canvas): String
}
object MyCanvas : Canvas {
override val suffix: String
field = ""
override get
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
override val suffix: String
field = ""
override get
}
fun box(): String {
@@ -41,3 +41,4 @@ fun box(): String {
}
)
}
@@ -3,12 +3,6 @@ FILE fqName:<root> fileName:/compareTo.kt
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Pair<A of <root>.Pair, B of <root>.Pair>
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> (first:A of <root>.Pair, second:B of <root>.Pair) returnType:<root>.Pair<A of <root>.Pair, B of <root>.Pair> [primary]
VALUE_PARAMETER name:first index:0 type:A of <root>.Pair
VALUE_PARAMETER name:second index:1 type:B of <root>.Pair
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Pair modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:first visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]
EXPRESSION_BODY
@@ -31,6 +25,12 @@ FILE fqName:<root> fileName:/compareTo.kt
RETURN type=kotlin.Nothing from='public final fun <get-second> (): B of <root>.Pair declared in <root>.Pair'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.<get-second>' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
CONSTRUCTOR visibility:public <> (first:A of <root>.Pair, second:B of <root>.Pair) returnType:<root>.Pair<A of <root>.Pair, B of <root>.Pair> [primary]
VALUE_PARAMETER name:first index:0 type:A of <root>.Pair
VALUE_PARAMETER name:second index:1 type:B of <root>.Pair
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Pair modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Pair<A of <root>.Pair, B of <root>.Pair>) returnType:A of <root>.Pair [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Pair<A of <root>.Pair, B of <root>.Pair>
BLOCK_BODY
@@ -60,59 +60,6 @@ FILE fqName:<root> fileName:/compareTo.kt
<class: B>: B of <root>.Pair
first: GET_VAR 'first: A of <root>.Pair declared in <root>.Pair.copy' type=A of <root>.Pair origin=null
second: GET_VAR 'second: B of <root>.Pair declared in <root>.Pair.copy' type=B of <root>.Pair origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Pair<A of <root>.Pair, B of <root>.Pair>) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Pair<A of <root>.Pair, B of <root>.Pair>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Pair'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Pair("
CONST String type=kotlin.String value="first="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.toString' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="second="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.toString' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Pair<A of <root>.Pair, B of <root>.Pair>) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Pair<A of <root>.Pair, B of <root>.Pair>
BLOCK_BODY
VAR name:result type:kotlin.Int [var]
WHEN type=kotlin.Int origin=null
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: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=0
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
SET_VAR 'var result: kotlin.Int declared in <root>.Pair.hashCode' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var result: kotlin.Int declared in <root>.Pair.hashCode' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=31
other: WHEN type=kotlin.Int origin=null
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: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=0
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Pair'
GET_VAR 'var result: kotlin.Int declared in <root>.Pair.hashCode' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Pair<A of <root>.Pair, B of <root>.Pair>, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -157,44 +104,59 @@ 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 declared in <root>.Pair'
CONST Boolean type=kotlin.Boolean value=true
FUN name:compareTo visibility:public modality:FINAL <T> ($receiver:T of <root>.compareTo, $context_receiver_0:java.util.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:$context_receiver_0 index:0 type:java.util.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> ($context_receiver_0: java.util.Comparator<T of <root>.compareTo>, other: T of <root>.compareTo): kotlin.Int 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 '$context_receiver_0: java.util.Comparator<T of <root>.compareTo> declared in <root>.compareTo' type=java.util.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>>, $context_receiver_0:java.util.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:$context_receiver_0 index:0 type:java.util.Comparator<T of <root>.<get-min>>
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Pair<A of <root>.Pair, B of <root>.Pair>) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Pair<A of <root>.Pair, B of <root>.Pair>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-min> <T> ($context_receiver_0: java.util.Comparator<T of <root>.<get-min>>): T of <root>.<get-min> declared in <root>'
WHEN type=T of <root>.<get-min> origin=IF
VAR name:result type:kotlin.Int [var]
WHEN type=kotlin.Int origin=null
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> ($context_receiver_0: java.util.Comparator<T of <root>.compareTo>, other: T of <root>.compareTo): kotlin.Int declared in <root>' type=kotlin.Int origin=null
<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
$context_receiver_0: GET_VAR '$context_receiver_0: java.util.Comparator<T of <root>.<get-min>> declared in <root>.<get-min>' type=java.util.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
then: 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
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: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=0
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: 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
then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
SET_VAR 'var result: kotlin.Int declared in <root>.Pair.hashCode' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var result: kotlin.Int declared in <root>.Pair.hashCode' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=31
other: WHEN type=kotlin.Int origin=null
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: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=0
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Pair'
GET_VAR 'var result: kotlin.Int declared in <root>.Pair.hashCode' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Pair<A of <root>.Pair, B of <root>.Pair>) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Pair<A of <root>.Pair, B of <root>.Pair>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Pair'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Pair("
CONST String type=kotlin.String value="first="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.toString' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="second="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.toString' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
CONST String type=kotlin.String value=")"
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:comparator type:java.util.Comparator<kotlin.String> [val]
@@ -244,3 +206,41 @@ FILE fqName:<root> fileName:/compareTo.kt
first: CONST String type=kotlin.String value="OK"
second: CONST String type=kotlin.String value="fail"
$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
FUN name:compareTo visibility:public modality:FINAL <T> ($receiver:T of <root>.compareTo, $context_receiver_0:java.util.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:$context_receiver_0 index:0 type:java.util.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> ($context_receiver_0: java.util.Comparator<T of <root>.compareTo>, other: T of <root>.compareTo): kotlin.Int 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 '$context_receiver_0: java.util.Comparator<T of <root>.compareTo> declared in <root>.compareTo' type=java.util.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>>, $context_receiver_0:java.util.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:$context_receiver_0 index:0 type:java.util.Comparator<T of <root>.<get-min>>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-min> <T> ($context_receiver_0: java.util.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> ($context_receiver_0: java.util.Comparator<T of <root>.compareTo>, other: T of <root>.compareTo): kotlin.Int declared in <root>' type=kotlin.Int origin=null
<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
$context_receiver_0: GET_VAR '$context_receiver_0: java.util.Comparator<T of <root>.<get-min>> declared in <root>.<get-min>' type=java.util.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
then: 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
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: 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
@@ -1,10 +1,4 @@
data class Pair<A : Any?, B : Any?> {
constructor(first: A, second: B) /* primary */ {
super/*Any*/()
/* <init>() */
}
val first: A
field = first
get
@@ -13,6 +7,12 @@ data class Pair<A : Any?, B : Any?> {
field = second
get
constructor(first: A, second: B) /* primary */ {
super/*Any*/()
/* <init>() */
}
operator fun component1(): A {
return <this>.#first
}
@@ -25,22 +25,6 @@ data class Pair<A : Any?, B : Any?> {
return Pair<A, B>(first = first, second = second)
}
override fun toString(): String {
return "Pair(" + "first=" + <this>.#first + ", " + "second=" + <this>.#second + ")"
}
override fun hashCode(): Int {
var result: Int = when {
EQEQ(arg0 = <this>.#first, arg1 = null) -> 0
else -> <this>.#first.hashCode()
}
result = result.times(other = 31).plus(other = when {
EQEQ(arg0 = <this>.#second, arg1 = null) -> 0
else -> <this>.#second.hashCode()
})
return result
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -58,20 +42,24 @@ data class Pair<A : Any?, B : Any?> {
return true
}
}
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($context_receiver_0: Comparator<T>): T {
return when {
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>()
override fun hashCode(): Int {
var result: Int = when {
EQEQ(arg0 = <this>.#first, arg1 = null) -> 0
else -> <this>.#first.hashCode()
}
result = result.times(other = 31).plus(other = when {
EQEQ(arg0 = <this>.#second, arg1 = null) -> 0
else -> <this>.#second.hashCode()
})
return result
}
override fun toString(): String {
return "Pair(" + "first=" + <this>.#first + ", " + "second=" + <this>.#second + ")"
}
}
fun box(): String {
val comparator: Comparator<String> = local fun <anonymous>(a: @FlexibleNullability String?, b: @FlexibleNullability String?): Int {
return when {
@@ -89,3 +77,15 @@ fun box(): String {
)
}
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($context_receiver_0: Comparator<T>): T {
return when {
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>()
}
}
@@ -3,12 +3,6 @@ FILE fqName:<root> fileName:/compareTo.kt
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Pair<A of <root>.Pair, B of <root>.Pair>
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> (first:A of <root>.Pair, second:B of <root>.Pair) returnType:<root>.Pair<A of <root>.Pair, B of <root>.Pair> [primary]
VALUE_PARAMETER name:first index:0 type:A of <root>.Pair
VALUE_PARAMETER name:second index:1 type:B of <root>.Pair
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Pair modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:first visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]
EXPRESSION_BODY
@@ -31,6 +25,12 @@ FILE fqName:<root> fileName:/compareTo.kt
RETURN type=kotlin.Nothing from='public final fun <get-second> (): B of <root>.Pair declared in <root>.Pair'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.<get-second>' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
CONSTRUCTOR visibility:public <> (first:A of <root>.Pair, second:B of <root>.Pair) returnType:<root>.Pair<A of <root>.Pair, B of <root>.Pair> [primary]
VALUE_PARAMETER name:first index:0 type:A of <root>.Pair
VALUE_PARAMETER name:second index:1 type:B of <root>.Pair
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Pair modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Pair<A of <root>.Pair, B of <root>.Pair>) returnType:A of <root>.Pair [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Pair<A of <root>.Pair, B of <root>.Pair>
BLOCK_BODY
@@ -60,59 +60,6 @@ FILE fqName:<root> fileName:/compareTo.kt
<class: B>: B of <root>.Pair
first: GET_VAR 'first: A of <root>.Pair declared in <root>.Pair.copy' type=A of <root>.Pair origin=null
second: GET_VAR 'second: B of <root>.Pair declared in <root>.Pair.copy' type=B of <root>.Pair origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Pair<A of <root>.Pair, B of <root>.Pair>) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Pair<A of <root>.Pair, B of <root>.Pair>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Pair'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Pair("
CONST String type=kotlin.String value="first="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.toString' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="second="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.toString' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Pair<A of <root>.Pair, B of <root>.Pair>) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Pair<A of <root>.Pair, B of <root>.Pair>
BLOCK_BODY
VAR name:result type:kotlin.Int [var]
WHEN type=kotlin.Int origin=null
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: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=0
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
SET_VAR 'var result: kotlin.Int declared in <root>.Pair.hashCode' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var result: kotlin.Int declared in <root>.Pair.hashCode' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=31
other: WHEN type=kotlin.Int origin=null
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: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=0
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Pair'
GET_VAR 'var result: kotlin.Int declared in <root>.Pair.hashCode' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Pair<A of <root>.Pair, B of <root>.Pair>, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -157,44 +104,59 @@ 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 declared in <root>.Pair'
CONST Boolean type=kotlin.Boolean value=true
FUN name:compareTo visibility:public modality:FINAL <T> ($receiver:T of <root>.compareTo, $context_receiver_0:java.util.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:$context_receiver_0 index:0 type:java.util.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> ($context_receiver_0: java.util.Comparator<T of <root>.compareTo>, other: T of <root>.compareTo): kotlin.Int 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 '$context_receiver_0: java.util.Comparator<T of <root>.compareTo> declared in <root>.compareTo' type=java.util.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>>, $context_receiver_0:java.util.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:$context_receiver_0 index:0 type:java.util.Comparator<T of <root>.<get-min>>
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Pair<A of <root>.Pair, B of <root>.Pair>) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Pair<A of <root>.Pair, B of <root>.Pair>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-min> <T> ($context_receiver_0: java.util.Comparator<T of <root>.<get-min>>): T of <root>.<get-min> declared in <root>'
WHEN type=T of <root>.<get-min> origin=IF
VAR name:result type:kotlin.Int [var]
WHEN type=kotlin.Int origin=null
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> ($context_receiver_0: java.util.Comparator<T of <root>.compareTo>, other: T of <root>.compareTo): kotlin.Int 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
$context_receiver_0: GET_VAR '$context_receiver_0: java.util.Comparator<T of <root>.<get-min>> declared in <root>.<get-min>' type=java.util.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
then: 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
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: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=0
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: 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
then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
SET_VAR 'var result: kotlin.Int declared in <root>.Pair.hashCode' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var result: kotlin.Int declared in <root>.Pair.hashCode' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=31
other: WHEN type=kotlin.Int origin=null
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: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=0
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.hashCode' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Pair'
GET_VAR 'var result: kotlin.Int declared in <root>.Pair.hashCode' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Pair<A of <root>.Pair, B of <root>.Pair>) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Pair<A of <root>.Pair, B of <root>.Pair>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Pair'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Pair("
CONST String type=kotlin.String value="first="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.toString' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="second="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.toString' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
CONST String type=kotlin.String value=")"
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:comparator type:java.util.Comparator<kotlin.String> [val]
@@ -246,3 +208,41 @@ FILE fqName:<root> fileName:/compareTo.kt
first: CONST String type=kotlin.String value="OK"
second: CONST String type=kotlin.String value="fail"
$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
FUN name:compareTo visibility:public modality:FINAL <T> ($receiver:T of <root>.compareTo, $context_receiver_0:java.util.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:$context_receiver_0 index:0 type:java.util.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> ($context_receiver_0: java.util.Comparator<T of <root>.compareTo>, other: T of <root>.compareTo): kotlin.Int 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 '$context_receiver_0: java.util.Comparator<T of <root>.compareTo> declared in <root>.compareTo' type=java.util.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>>, $context_receiver_0:java.util.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:$context_receiver_0 index:0 type:java.util.Comparator<T of <root>.<get-min>>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-min> <T> ($context_receiver_0: java.util.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> ($context_receiver_0: java.util.Comparator<T of <root>.compareTo>, other: T of <root>.compareTo): kotlin.Int 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
$context_receiver_0: GET_VAR '$context_receiver_0: java.util.Comparator<T of <root>.<get-min>> declared in <root>.<get-min>' type=java.util.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
then: 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
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: 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
@@ -1,10 +1,4 @@
data class Pair<A : Any?, B : Any?> {
constructor(first: A, second: B) /* primary */ {
super/*Any*/()
/* <init>() */
}
val first: A
field = first
get
@@ -13,6 +7,12 @@ data class Pair<A : Any?, B : Any?> {
field = second
get
constructor(first: A, second: B) /* primary */ {
super/*Any*/()
/* <init>() */
}
operator fun component1(): A {
return <this>.#first
}
@@ -25,22 +25,6 @@ data class Pair<A : Any?, B : Any?> {
return Pair<A, B>(first = first, second = second)
}
override fun toString(): String {
return "Pair(" + "first=" + <this>.#first + ", " + "second=" + <this>.#second + ")"
}
override fun hashCode(): Int {
var result: Int = when {
EQEQ(arg0 = <this>.#first, arg1 = null) -> 0
else -> <this>.#first.hashCode()
}
result = result.times(other = 31).plus(other = when {
EQEQ(arg0 = <this>.#second, arg1 = null) -> 0
else -> <this>.#second.hashCode()
})
return result
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -58,20 +42,24 @@ data class Pair<A : Any?, B : Any?> {
return true
}
}
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($context_receiver_0: Comparator<T>): T {
return when {
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>()
override fun hashCode(): Int {
var result: Int = when {
EQEQ(arg0 = <this>.#first, arg1 = null) -> 0
else -> <this>.#first.hashCode()
}
result = result.times(other = 31).plus(other = when {
EQEQ(arg0 = <this>.#second, arg1 = null) -> 0
else -> <this>.#second.hashCode()
})
return result
}
override fun toString(): String {
return "Pair(" + "first=" + <this>.#first + ", " + "second=" + <this>.#second + ")"
}
}
fun box(): String {
val comparator: Comparator<String> = local fun <anonymous>(a: @FlexibleNullability String?, b: @FlexibleNullability String?): Int {
return when {
@@ -88,3 +76,16 @@ fun box(): String {
}
)
}
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($context_receiver_0: Comparator<T>): T {
return when {
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>()
}
}
@@ -1,10 +1,6 @@
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> () 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
@@ -16,6 +12,10 @@ FILE fqName:<root> fileName:/dp.kt
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
CONSTRUCTOR visibility:public <> () returnType:<root>.View [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:View 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 declared in kotlin.Any
@@ -29,18 +29,6 @@ FILE fqName:<root> fileName:/dp.kt
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, $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:$context_receiver_0 index:0 type:<root>.View
BLOCK_BODY
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 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 '$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
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with declared in kotlin' type=kotlin.Nothing origin=null
@@ -82,3 +70,15 @@ FILE fqName:<root> fileName:/dp.kt
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"
PROPERTY name:dp visibility:public modality:FINAL [val]
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:$context_receiver_0 index:0 type:<root>.View
BLOCK_BODY
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 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 '$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
@@ -1,21 +1,16 @@
class View {
val coefficient: Int
field = 42
get
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val coefficient: Int
field = 42
get
}
val Int.dp: Int
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 {
@@ -30,3 +25,9 @@ fun box(): String {
}
)
}
val Int.dp: Int
get($context_receiver_0: View): Int {
return $context_receiver_0.<get-coefficient>().times(other = <this>)
}
@@ -1,4 +1,64 @@
FILE fqName:<root> fileName:/functionalType.kt
CLASS CLASS name:K modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.K
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
CONSTRUCTOR visibility:public <> () returnType:<root>.K [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K 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 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
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
CONSTRUCTOR visibility:public <> () returnType:<root>.O [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:O 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 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: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]
@@ -18,79 +78,6 @@ 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
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> () 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 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> () 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 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, $context_receiver_0:<root>.O, g:@[ExtensionFunctionType] 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:$context_receiver_0 index:0 type:<root>.O
VALUE_PARAMETER name:g index:1 type:@[ExtensionFunctionType] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun f <T> ($context_receiver_0: <root>.O, g: @[ExtensionFunctionType] 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 declared in kotlin.Function3' type=T of <root>.f origin=INVOKE
$this: GET_VAR 'g: @[ExtensionFunctionType] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f> declared in <root>.f' type=@[ExtensionFunctionType] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f> origin=VARIABLE_AS_FUNCTION
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> () 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>'
@@ -120,3 +107,16 @@ FILE fqName:<root> fileName:/functionalType.kt
$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
FUN name:f visibility:public modality:FINAL <T> ($receiver:<root>.K, $context_receiver_0:<root>.O, g:@[ExtensionFunctionType] 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:$context_receiver_0 index:0 type:<root>.O
VALUE_PARAMETER name:g index:1 type:@[ExtensionFunctionType] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun f <T> ($context_receiver_0: <root>.O, g: @[ExtensionFunctionType] 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 declared in kotlin.Function3' type=T of <root>.f origin=INVOKE
$this: GET_VAR 'g: @[ExtensionFunctionType] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f> declared in <root>.f' type=@[ExtensionFunctionType] kotlin.Function3<<root>.O, <root>.K, <root>.Param, T of <root>.f> origin=VARIABLE_AS_FUNCTION
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> () declared in <root>.Param' type=<root>.Param origin=null
@@ -1,4 +1,8 @@
class Param {
class K {
val k: String
field = "K"
get
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
@@ -8,33 +12,25 @@ class Param {
}
class O {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val o: String
field = "O"
get
}
class K {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val k: String
field = "K"
get
}
fun <T : Any?> K.f($context_receiver_0: O, g: @ExtensionFunctionType Function3<O, K, Param, T>): T {
return g.invoke(p1 = $context_receiver_0, p2 = <this>, p3 = Param())
class Param {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
fun box(): String {
@@ -46,3 +42,8 @@ fun box(): String {
}
)
}
fun <T : Any?> K.f($context_receiver_0: O, g: @ExtensionFunctionType Function3<O, K, Param, T>): T {
return g.invoke(p1 = $context_receiver_0, p2 = <this>, p3 = Param())
}
@@ -1,4 +1,64 @@
FILE fqName:<root> fileName:/functionalType.kt
CLASS CLASS name:K modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.K
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
CONSTRUCTOR visibility:public <> () returnType:<root>.K [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K 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 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
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
CONSTRUCTOR visibility:public <> () returnType:<root>.O [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:O 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 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: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]
@@ -18,79 +78,6 @@ 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
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> () 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 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> () 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 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, $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:$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> ($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 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 '$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> () 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>'
@@ -120,3 +107,16 @@ FILE fqName:<root> fileName:/functionalType.kt
$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
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:$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> ($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 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 '$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> () declared in <root>.Param' type=<root>.Param origin=null
@@ -1,4 +1,8 @@
class Param {
class K {
val k: String
field = "K"
get
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
@@ -8,33 +12,25 @@ class Param {
}
class O {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val o: String
field = "O"
get
}
class K {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val k: String
field = "K"
get
}
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())
class Param {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
fun box(): String {
@@ -46,3 +42,8 @@ fun box(): String {
}
)
}
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())
}
@@ -1,31 +1,7 @@
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?] reified:false
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 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?] reified:false
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 declared in <root>.Semigroup
@@ -45,23 +21,32 @@ FILE fqName:<root> fileName:/monoidSum.kt
overridden:
public open fun toString (): kotlin.String declared in <root>.Semigroup
$this: VALUE_PARAMETER name:<this> type: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>
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?] reified:false
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 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: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
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> () 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 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 declared in <root>.IntMonoid'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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
@@ -77,6 +62,10 @@ FILE fqName:<root> fileName:/monoidSum.kt
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
CONSTRUCTOR visibility:private <> () returnType:<root>.IntMonoid [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:IntMonoid modality:FINAL visibility:public superTypes:[<root>.Monoid<kotlin.Int>]'
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 declared in <root>.Monoid
@@ -90,23 +79,19 @@ FILE fqName:<root> fileName:/monoidSum.kt
overridden:
public open fun toString (): kotlin.String 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> () 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]
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 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
$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.String): kotlin.String declared in <root>.StringMonoid'
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String 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
RETURN type=kotlin.Nothing from='public open fun combine (other: kotlin.Int): kotlin.Int declared in <root>.IntMonoid'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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
CLASS OBJECT name:StringMonoid modality:FINAL visibility:public superTypes:[<root>.Monoid<kotlin.String>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.StringMonoid
PROPERTY name:unit visibility:public modality:OPEN [val]
overridden:
public abstract unit: T of <root>.Monoid
@@ -122,6 +107,10 @@ FILE fqName:<root> fileName:/monoidSum.kt
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
CONSTRUCTOR visibility:private <> () returnType:<root>.StringMonoid [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:StringMonoid modality:FINAL visibility:public superTypes:[<root>.Monoid<kotlin.String>]'
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 declared in <root>.Monoid
@@ -135,29 +124,17 @@ FILE fqName:<root> fileName:/monoidSum.kt
overridden:
public open fun toString (): kotlin.String 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>, $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:$context_receiver_0 index:0 type:<root>.Monoid<T of <root>.sum>
BLOCK_BODY
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.fold, operation: kotlin.Function2<@[ParameterName(name = "acc")] R of kotlin.collections.fold, T of kotlin.collections.fold, R of kotlin.collections.fold>): R of kotlin.collections.fold declared in kotlin.collections' 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 '$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:@[ParameterName(name = "acc")] T of <root>.sum, e:T of <root>.sum) returnType:T of <root>.sum
VALUE_PARAMETER name:acc index:0 type:@[ParameterName(name = "acc")] 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: @[ParameterName(name = "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 declared in <root>.Monoid' type=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: @[ParameterName(name = "acc")] T of <root>.sum declared in <root>.sum.<anonymous>' type=@[ParameterName(name = "acc")] 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: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 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 declared in <root>.StringMonoid'
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String 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
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
@@ -197,3 +174,26 @@ FILE fqName:<root> fileName:/monoidSum.kt
CONST String type=kotlin.String value="O"
CONST String type=kotlin.String value="K"
$context_receiver_0: GET_VAR '$this$with: <root>.StringMonoid declared in <root>.box.<anonymous>' type=<root>.StringMonoid origin=null
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:$context_receiver_0 index:0 type:<root>.Monoid<T of <root>.sum>
BLOCK_BODY
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.fold, operation: kotlin.Function2<@[ParameterName(name = "acc")] R of kotlin.collections.fold, T of kotlin.collections.fold, R of kotlin.collections.fold>): R of kotlin.collections.fold declared in kotlin.collections' 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 '$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:@[ParameterName(name = "acc")] T of <root>.sum, e:T of <root>.sum) returnType:T of <root>.sum
VALUE_PARAMETER name:acc index:0 type:@[ParameterName(name = "acc")] 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: @[ParameterName(name = "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 declared in <root>.Monoid' type=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: @[ParameterName(name = "acc")] T of <root>.sum declared in <root>.sum.<anonymous>' type=@[ParameterName(name = "acc")] 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
@@ -1,15 +1,19 @@
interface Semigroup<T : Any?> {
abstract infix fun T.combine(other: T): T
}
interface Monoid<T : Any?> : Semigroup<T> {
abstract val unit: T
abstract get
}
interface Semigroup<T : Any?> {
abstract infix fun T.combine(other: T): T
}
object IntMonoid : Monoid<Int> {
override val unit: Int
field = 0
override get
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
@@ -20,13 +24,13 @@ object IntMonoid : Monoid<Int> {
return <this>.plus(other = other)
}
override val unit: Int
field = 0
override get
}
object StringMonoid : Monoid<String> {
override val unit: String
field = ""
override get
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
@@ -37,17 +41,6 @@ object StringMonoid : Monoid<String> {
return <this>.plus(other = other)
}
override val unit: String
field = ""
override get
}
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: @ParameterName(name = "acc") T, e: T): T {
return ($context_receiver_0, acc).combine(other = e)
}
)
}
fun box(): String {
@@ -60,3 +53,11 @@ fun box(): String {
}
)
}
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: @ParameterName(name = "acc") T, e: T): T {
return ($context_receiver_0, acc).combine(other = e)
}
)
}
@@ -1,31 +1,7 @@
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?] reified:false
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 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?] reified:false
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 declared in <root>.Semigroup
@@ -45,23 +21,32 @@ FILE fqName:<root> fileName:/monoidSum.kt
overridden:
public open fun toString (): kotlin.String declared in <root>.Semigroup
$this: VALUE_PARAMETER name:<this> type: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>
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?] reified:false
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 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: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
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> () 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 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 declared in <root>.IntMonoid'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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
@@ -77,6 +62,10 @@ FILE fqName:<root> fileName:/monoidSum.kt
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
CONSTRUCTOR visibility:private <> () returnType:<root>.IntMonoid [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:IntMonoid modality:FINAL visibility:public superTypes:[<root>.Monoid<kotlin.Int>]'
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 declared in <root>.Monoid
@@ -90,23 +79,19 @@ FILE fqName:<root> fileName:/monoidSum.kt
overridden:
public open fun toString (): kotlin.String 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> () 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]
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 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
$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.String): kotlin.String declared in <root>.StringMonoid'
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String 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
RETURN type=kotlin.Nothing from='public open fun combine (other: kotlin.Int): kotlin.Int declared in <root>.IntMonoid'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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
CLASS OBJECT name:StringMonoid modality:FINAL visibility:public superTypes:[<root>.Monoid<kotlin.String>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.StringMonoid
PROPERTY name:unit visibility:public modality:OPEN [val]
overridden:
public abstract unit: T of <root>.Monoid
@@ -122,6 +107,10 @@ FILE fqName:<root> fileName:/monoidSum.kt
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
CONSTRUCTOR visibility:private <> () returnType:<root>.StringMonoid [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:StringMonoid modality:FINAL visibility:public superTypes:[<root>.Monoid<kotlin.String>]'
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 declared in <root>.Monoid
@@ -135,29 +124,17 @@ FILE fqName:<root> fileName:/monoidSum.kt
overridden:
public open fun toString (): kotlin.String 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>, $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:$context_receiver_0 index:0 type:<root>.Monoid<T of <root>.sum>
BLOCK_BODY
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.fold, operation: kotlin.Function2<@[ParameterName(name = "acc")] R of kotlin.collections.fold, T of kotlin.collections.fold, R of kotlin.collections.fold>): R of kotlin.collections.fold declared in kotlin.collections' 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 '$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
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 declared in <root>.Monoid' type=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: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 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 declared in <root>.StringMonoid'
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String 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
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
@@ -197,3 +174,26 @@ FILE fqName:<root> fileName:/monoidSum.kt
CONST String type=kotlin.String value="O"
CONST String type=kotlin.String value="K"
$context_receiver_0: GET_VAR '$this$with: <root>.StringMonoid declared in <root>.box.<anonymous>' type=<root>.StringMonoid origin=null
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:$context_receiver_0 index:0 type:<root>.Monoid<T of <root>.sum>
BLOCK_BODY
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.fold, operation: kotlin.Function2<@[ParameterName(name = "acc")] R of kotlin.collections.fold, T of kotlin.collections.fold, R of kotlin.collections.fold>): R of kotlin.collections.fold declared in kotlin.collections' 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 '$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
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 declared in <root>.Monoid' type=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
@@ -1,15 +1,19 @@
interface Semigroup<T : Any?> {
abstract infix fun T.combine(other: T): T
}
interface Monoid<T : Any?> : Semigroup<T> {
abstract val unit: T
abstract get
}
interface Semigroup<T : Any?> {
abstract infix fun T.combine(other: T): T
}
object IntMonoid : Monoid<Int> {
override val unit: Int
field = 0
override get
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
@@ -20,13 +24,13 @@ object IntMonoid : Monoid<Int> {
return <this>.plus(other = other)
}
override val unit: Int
field = 0
override get
}
object StringMonoid : Monoid<String> {
override val unit: String
field = ""
override get
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
@@ -37,17 +41,6 @@ object StringMonoid : Monoid<String> {
return <this>.plus(other = other)
}
override val unit: String
field = ""
override get
}
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 {
@@ -60,3 +53,11 @@ fun box(): String {
}
)
}
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)
}
)
}
@@ -1,10 +1,6 @@
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> () 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
@@ -16,6 +12,10 @@ FILE fqName:<root> fileName:/function.kt
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
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C 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 declared in kotlin.Any
@@ -29,13 +29,6 @@ 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 <> ($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
@@ -49,3 +42,10 @@ FILE fqName:<root> fileName:/function.kt
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
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
@@ -1,18 +1,14 @@
class C {
val c: Int
field = 42
get
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) {
@@ -21,3 +17,8 @@ fun bar(c: C) {
}
)
}
fun foo($context_receiver_0: C) {
$context_receiver_0.<get-c>() /*~> Unit */
}
@@ -1,4 +1,34 @@
FILE fqName:<root> fileName:/functionalType.kt
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
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
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C 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 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: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]
@@ -18,42 +48,8 @@ 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
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> () 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 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:R modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.R
CONSTRUCTOR visibility:public <> () returnType:<root>.R [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:R modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:r visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:r type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
@@ -65,6 +61,10 @@ FILE fqName:<root> fileName:/functionalType.kt
RETURN type=kotlin.Nothing from='public final fun <get-r> (): kotlin.Int declared in <root>.R'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:r type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.R declared in <root>.R.<get-r>' type=<root>.R origin=null
CONSTRUCTOR visibility:public <> () returnType:<root>.R [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:R 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 declared in kotlin.Any
@@ -1,3 +1,16 @@
class C {
val c: Int
field = 42
get
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class Param {
constructor() /* primary */ {
super/*Any*/()
@@ -7,30 +20,17 @@ class Param {
}
class C {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val c: Int
field = 42
get
}
class R {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val r: Int
field = 42
get
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
fun R.f1($context_receiver_0: C, g: @ExtensionFunctionType Function3<C, R, Param, Unit>) {
@@ -97,3 +97,4 @@ fun test() {
}
)
}
@@ -1,4 +1,34 @@
FILE fqName:<root> fileName:/functionalType.kt
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
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
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C 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 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: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]
@@ -18,42 +48,8 @@ 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
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> () 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 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:R modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.R
CONSTRUCTOR visibility:public <> () returnType:<root>.R [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:R modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:r visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:r type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
@@ -65,6 +61,10 @@ FILE fqName:<root> fileName:/functionalType.kt
RETURN type=kotlin.Nothing from='public final fun <get-r> (): kotlin.Int declared in <root>.R'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:r type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.R declared in <root>.R.<get-r>' type=<root>.R origin=null
CONSTRUCTOR visibility:public <> () returnType:<root>.R [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:R 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 declared in kotlin.Any
@@ -1,3 +1,16 @@
class C {
val c: Int
field = 42
get
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class Param {
constructor() /* primary */ {
super/*Any*/()
@@ -7,30 +20,17 @@ class Param {
}
class C {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val c: Int
field = 42
get
}
class R {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val r: Int
field = 42
get
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
fun R.f1($context_receiver_0: C, g: @ExtensionFunctionType @ContextFunctionTypeParams(count = 1) Function3<C, R, Param, Unit>) {
@@ -97,3 +97,4 @@ fun test() {
}
)
}
@@ -49,13 +49,6 @@ FILE fqName:<root> fileName:/genericOuterClass.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 <> ($receiver:kotlin.Int) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CONSTRUCTOR_CALL 'public constructor <init> ($context_receiver_0: T of <root>.A) declared in <root>.A' type=<root>.A<kotlin.Int> origin=null
<class: T>: kotlin.Int
$context_receiver_0: GET_VAR '<this>: kotlin.Int declared in <root>.foo' type=kotlin.Int origin=null
FUN name:bar visibility:public modality:FINAL <> ($receiver:kotlin.collections.Collection<kotlin.Int>) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:kotlin.collections.Collection<kotlin.Int>
BLOCK_BODY
@@ -63,3 +56,10 @@ FILE fqName:<root> fileName:/genericOuterClass.kt
CONSTRUCTOR_CALL 'public constructor <init> ($context_receiver_0: kotlin.collections.Collection<P of <root>.B>) declared in <root>.B' type=<root>.B<kotlin.Int> origin=null
<class: P>: kotlin.Int
$context_receiver_0: GET_VAR '<this>: kotlin.collections.Collection<kotlin.Int> declared in <root>.bar' type=kotlin.collections.Collection<kotlin.Int> origin=null
FUN name:foo visibility:public modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CONSTRUCTOR_CALL 'public constructor <init> ($context_receiver_0: T of <root>.A) declared in <root>.A' type=<root>.A<kotlin.Int> origin=null
<class: T>: kotlin.Int
$context_receiver_0: GET_VAR '<this>: kotlin.Int declared in <root>.foo' type=kotlin.Int origin=null
@@ -20,10 +20,11 @@ class B<P : Any?> {
}
fun Collection<Int>.bar() {
B<Int>($context_receiver_0 = <this>) /*~> Unit */
}
fun Int.foo() {
A<Int>($context_receiver_0 = <this>) /*~> Unit */
}
fun Collection<Int>.bar() {
B<Int>($context_receiver_0 = <this>) /*~> Unit */
}
@@ -1,13 +1,6 @@
FILE fqName:<root> fileName:/iteratorOperator.kt
CLASS CLASS name:Counter modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Counter
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.Counter [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Counter modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:i visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private
EXPRESSION_BODY
@@ -27,6 +20,13 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.<set-i>' type=<root>.Counter origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.Counter.<set-i>' type=kotlin.Int origin=null
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.Counter [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Counter modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Counter) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
BLOCK_BODY
@@ -43,27 +43,6 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): <root>.Counter declared in <root>.Counter'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Counter' type=<root>.Counter origin=null
i: GET_VAR 'i: kotlin.Int declared in <root>.Counter.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Counter) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Counter'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Counter("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.toString' type=<root>.Counter origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Counter) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Counter'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.hashCode' type=<root>.Counter origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Counter, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -98,15 +77,29 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Counter'
CONST Boolean type=kotlin.Boolean value=true
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Counter) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Counter'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.hashCode' type=<root>.Counter origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Counter) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Counter'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Counter("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.toString' type=<root>.Counter origin=null
CONST String type=kotlin.String value=")"
CLASS CLASS name:CounterConfig modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CounterConfig
CONSTRUCTOR visibility:public <> (max:kotlin.Int) returnType:<root>.CounterConfig [primary]
VALUE_PARAMETER name:max index:0 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=10
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:CounterConfig modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:max visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
@@ -118,6 +111,13 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
RETURN type=kotlin.Nothing from='public final fun <get-max> (): kotlin.Int declared in <root>.CounterConfig'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.<get-max>' type=<root>.CounterConfig origin=null
CONSTRUCTOR visibility:public <> (max:kotlin.Int) returnType:<root>.CounterConfig [primary]
VALUE_PARAMETER name:max index:0 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=10
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:CounterConfig modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.CounterConfig) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
BLOCK_BODY
@@ -134,27 +134,6 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
RETURN type=kotlin.Nothing from='public final fun copy (max: kotlin.Int): <root>.CounterConfig declared in <root>.CounterConfig'
CONSTRUCTOR_CALL 'public constructor <init> (max: kotlin.Int) declared in <root>.CounterConfig' type=<root>.CounterConfig origin=null
max: GET_VAR 'max: kotlin.Int declared in <root>.CounterConfig.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.CounterConfig) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.CounterConfig'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="CounterConfig("
CONST String type=kotlin.String value="max="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.toString' type=<root>.CounterConfig origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.CounterConfig) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.CounterConfig'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.hashCode' type=<root>.CounterConfig origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.CounterConfig, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -189,18 +168,30 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.CounterConfig'
CONST Boolean type=kotlin.Boolean value=true
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.CounterConfig) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.CounterConfig'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.hashCode' type=<root>.CounterConfig origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.CounterConfig) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.CounterConfig'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="CounterConfig("
CONST String type=kotlin.String value="max="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.toString' type=<root>.CounterConfig origin=null
CONST String type=kotlin.String value=")"
CLASS CLASS name:CounterIterator modality:FINAL visibility:public superTypes:[kotlin.collections.Iterator<kotlin.Int>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CounterIterator
FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.CounterConfig visibility:private [final]
CONSTRUCTOR visibility:public <> ($context_receiver_0:<root>.CounterConfig, counter:<root>.Counter) returnType:<root>.CounterIterator [primary]
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.CounterConfig
VALUE_PARAMETER name:counter index:1 type:<root>.Counter
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
SET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.CounterConfig visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.CounterIterator declared in <root>.CounterIterator' type=<root>.CounterIterator origin=null
value: GET_VAR '$context_receiver_0: <root>.CounterConfig declared in <root>.CounterIterator.<init>' type=<root>.CounterConfig origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:CounterIterator modality:FINAL visibility:public superTypes:[kotlin.collections.Iterator<kotlin.Int>]'
PROPERTY name:counter visibility:private modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:counter type:<root>.Counter visibility:private [final]
EXPRESSION_BODY
@@ -212,6 +203,28 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
RETURN type=kotlin.Nothing from='private final fun <get-counter> (): <root>.Counter declared in <root>.CounterIterator'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:<root>.Counter visibility:private [final]' type=<root>.Counter origin=null
receiver: GET_VAR '<this>: <root>.CounterIterator declared in <root>.CounterIterator.<get-counter>' type=<root>.CounterIterator origin=null
CONSTRUCTOR visibility:public <> ($context_receiver_0:<root>.CounterConfig, counter:<root>.Counter) returnType:<root>.CounterIterator [primary]
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.CounterConfig
VALUE_PARAMETER name:counter index:1 type:<root>.Counter
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
SET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.CounterConfig visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.CounterIterator declared in <root>.CounterIterator' type=<root>.CounterIterator origin=null
value: GET_VAR '$context_receiver_0: <root>.CounterConfig declared in <root>.CounterIterator.<init>' type=<root>.CounterConfig origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:CounterIterator modality:FINAL visibility:public superTypes:[kotlin.collections.Iterator<kotlin.Int>]'
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 declared in kotlin.collections.Iterator
$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.collections.Iterator
$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.collections.Iterator
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:hasNext visibility:public modality:OPEN <> ($this:<root>.CounterIterator) returnType:kotlin.Boolean [operator]
overridden:
public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator
@@ -243,37 +256,6 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
<set-?>: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_3: kotlin.Int declared in <root>.CounterIterator.next' type=kotlin.Int origin=null
GET_VAR 'val tmp_3: kotlin.Int declared in <root>.CounterIterator.next' type=kotlin.Int 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 declared in kotlin.collections.Iterator
$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.collections.Iterator
$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.collections.Iterator
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
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:$context_receiver_0 index:0 type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun iterator ($context_receiver_0: <root>.CounterConfig): <root>.CounterIterator declared in <root>'
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with declared in kotlin' type=<root>.CounterIterator origin=null
<T>: <root>.CounterConfig
<R>: <root>.CounterIterator
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
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): <root>.CounterIterator declared in <root>.iterator'
CONSTRUCTOR_CALL 'public constructor <init> ($context_receiver_0: <root>.CounterConfig, counter: <root>.Counter) declared in <root>.CounterIterator' type=<root>.CounterIterator origin=null
$context_receiver_0: GET_VAR '$this$with: <root>.CounterConfig declared in <root>.iterator.<anonymous>' type=<root>.CounterConfig origin=null
counter: GET_VAR '<this>: <root>.Counter declared in <root>.iterator' type=<root>.Counter origin=null
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:result type:kotlin.Int [var]
@@ -313,3 +295,21 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST String type=kotlin.String value="fail"
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:$context_receiver_0 index:0 type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun iterator ($context_receiver_0: <root>.CounterConfig): <root>.CounterIterator declared in <root>'
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with declared in kotlin' type=<root>.CounterIterator origin=null
<T>: <root>.CounterConfig
<R>: <root>.CounterIterator
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
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): <root>.CounterIterator declared in <root>.iterator'
CONSTRUCTOR_CALL 'public constructor <init> ($context_receiver_0: <root>.CounterConfig, counter: <root>.Counter) declared in <root>.CounterIterator' type=<root>.CounterIterator origin=null
$context_receiver_0: GET_VAR '$this$with: <root>.CounterConfig declared in <root>.iterator.<anonymous>' type=<root>.CounterConfig origin=null
counter: GET_VAR '<this>: <root>.Counter declared in <root>.iterator' type=<root>.Counter origin=null
@@ -1,15 +1,15 @@
data class Counter {
var i: Int
field = i
get
set
constructor(i: Int = 0) /* primary */ {
super/*Any*/()
/* <init>() */
}
var i: Int
field = i
get
set
operator fun component1(): Int {
return <this>.#i
}
@@ -18,14 +18,6 @@ data class Counter {
return Counter(i = i)
}
override fun toString(): String {
return "Counter(" + "i=" + <this>.#i + ")"
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -40,19 +32,27 @@ data class Counter {
return true
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
override fun toString(): String {
return "Counter(" + "i=" + <this>.#i + ")"
}
}
data class CounterConfig {
val max: Int
field = max
get
constructor(max: Int = 10) /* primary */ {
super/*Any*/()
/* <init>() */
}
val max: Int
field = max
get
operator fun component1(): Int {
return <this>.#max
}
@@ -61,14 +61,6 @@ data class CounterConfig {
return CounterConfig(max = max)
}
override fun toString(): String {
return "CounterConfig(" + "max=" + <this>.#max + ")"
}
override fun hashCode(): Int {
return <this>.#max.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -83,10 +75,22 @@ data class CounterConfig {
return true
}
override fun hashCode(): Int {
return <this>.#max.hashCode()
}
override fun toString(): String {
return "CounterConfig(" + "max=" + <this>.#max + ")"
}
}
class CounterIterator : Iterator<Int> {
private /* final field */ val contextReceiverField0: CounterConfig
private val counter: Counter
field = counter
private get
constructor($context_receiver_0: CounterConfig, counter: Counter) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = $context_receiver_0
@@ -94,10 +98,6 @@ class CounterIterator : Iterator<Int> {
}
private val counter: Counter
field = counter
private get
override operator fun hasNext(): Boolean {
return less(arg0 = <this>.<get-counter>().<get-i>(), arg1 = <this>.#contextReceiverField0.<get-max>())
}
@@ -113,13 +113,6 @@ class CounterIterator : Iterator<Int> {
}
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($context_receiver_0 = $this$with, counter = <this>)
}
)
}
fun box(): String {
var result: Int = 0
with<CounterConfig, Unit>(receiver = CounterConfig(), block = local fun CounterConfig.<anonymous>() {
@@ -140,3 +133,10 @@ fun box(): String {
}
}
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($context_receiver_0 = $this$with, counter = <this>)
}
)
}
@@ -1,13 +1,6 @@
FILE fqName:<root> fileName:/iteratorOperator.kt
CLASS CLASS name:Counter modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Counter
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.Counter [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Counter modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:i visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private
EXPRESSION_BODY
@@ -27,6 +20,13 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.<set-i>' type=<root>.Counter origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.Counter.<set-i>' type=kotlin.Int origin=null
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.Counter [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Counter modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Counter) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
BLOCK_BODY
@@ -43,27 +43,6 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): <root>.Counter declared in <root>.Counter'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Counter' type=<root>.Counter origin=null
i: GET_VAR 'i: kotlin.Int declared in <root>.Counter.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Counter) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Counter'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Counter("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.toString' type=<root>.Counter origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Counter) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Counter'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.hashCode' type=<root>.Counter origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Counter, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -98,15 +77,29 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Counter'
CONST Boolean type=kotlin.Boolean value=true
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Counter) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Counter'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.hashCode' type=<root>.Counter origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Counter) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Counter'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Counter("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.toString' type=<root>.Counter origin=null
CONST String type=kotlin.String value=")"
CLASS CLASS name:CounterConfig modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CounterConfig
CONSTRUCTOR visibility:public <> (max:kotlin.Int) returnType:<root>.CounterConfig [primary]
VALUE_PARAMETER name:max index:0 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=10
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:CounterConfig modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:max visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
@@ -118,6 +111,13 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
RETURN type=kotlin.Nothing from='public final fun <get-max> (): kotlin.Int declared in <root>.CounterConfig'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.<get-max>' type=<root>.CounterConfig origin=null
CONSTRUCTOR visibility:public <> (max:kotlin.Int) returnType:<root>.CounterConfig [primary]
VALUE_PARAMETER name:max index:0 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=10
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:CounterConfig modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.CounterConfig) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
BLOCK_BODY
@@ -134,27 +134,6 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
RETURN type=kotlin.Nothing from='public final fun copy (max: kotlin.Int): <root>.CounterConfig declared in <root>.CounterConfig'
CONSTRUCTOR_CALL 'public constructor <init> (max: kotlin.Int) declared in <root>.CounterConfig' type=<root>.CounterConfig origin=null
max: GET_VAR 'max: kotlin.Int declared in <root>.CounterConfig.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.CounterConfig) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.CounterConfig'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="CounterConfig("
CONST String type=kotlin.String value="max="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.toString' type=<root>.CounterConfig origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.CounterConfig) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.CounterConfig'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.hashCode' type=<root>.CounterConfig origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.CounterConfig, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -189,18 +168,30 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.CounterConfig'
CONST Boolean type=kotlin.Boolean value=true
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.CounterConfig) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.CounterConfig'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.hashCode' type=<root>.CounterConfig origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.CounterConfig) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.CounterConfig'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="CounterConfig("
CONST String type=kotlin.String value="max="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.toString' type=<root>.CounterConfig origin=null
CONST String type=kotlin.String value=")"
CLASS CLASS name:CounterIterator modality:FINAL visibility:public superTypes:[kotlin.collections.Iterator<kotlin.Int>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CounterIterator
FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.CounterConfig visibility:private [final]
CONSTRUCTOR visibility:public <> ($context_receiver_0:<root>.CounterConfig, counter:<root>.Counter) returnType:<root>.CounterIterator [primary]
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.CounterConfig
VALUE_PARAMETER name:counter index:1 type:<root>.Counter
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
SET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.CounterConfig visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.CounterIterator declared in <root>.CounterIterator' type=<root>.CounterIterator origin=null
value: GET_VAR '$context_receiver_0: <root>.CounterConfig declared in <root>.CounterIterator.<init>' type=<root>.CounterConfig origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:CounterIterator modality:FINAL visibility:public superTypes:[kotlin.collections.Iterator<kotlin.Int>]'
PROPERTY name:counter visibility:private modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:counter type:<root>.Counter visibility:private [final]
EXPRESSION_BODY
@@ -212,6 +203,28 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
RETURN type=kotlin.Nothing from='private final fun <get-counter> (): <root>.Counter declared in <root>.CounterIterator'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:<root>.Counter visibility:private [final]' type=<root>.Counter origin=null
receiver: GET_VAR '<this>: <root>.CounterIterator declared in <root>.CounterIterator.<get-counter>' type=<root>.CounterIterator origin=null
CONSTRUCTOR visibility:public <> ($context_receiver_0:<root>.CounterConfig, counter:<root>.Counter) returnType:<root>.CounterIterator [primary]
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.CounterConfig
VALUE_PARAMETER name:counter index:1 type:<root>.Counter
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
SET_FIELD 'FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.CounterConfig visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.CounterIterator declared in <root>.CounterIterator' type=<root>.CounterIterator origin=null
value: GET_VAR '$context_receiver_0: <root>.CounterConfig declared in <root>.CounterIterator.<init>' type=<root>.CounterConfig origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:CounterIterator modality:FINAL visibility:public superTypes:[kotlin.collections.Iterator<kotlin.Int>]'
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 declared in kotlin.collections.Iterator
$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.collections.Iterator
$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.collections.Iterator
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:hasNext visibility:public modality:OPEN <> ($this:<root>.CounterIterator) returnType:kotlin.Boolean [operator]
overridden:
public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator
@@ -244,37 +257,6 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
<set-?>: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_3: kotlin.Int declared in <root>.CounterIterator.next' type=kotlin.Int origin=null
GET_VAR 'val tmp_3: kotlin.Int declared in <root>.CounterIterator.next' type=kotlin.Int 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 declared in kotlin.collections.Iterator
$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.collections.Iterator
$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.collections.Iterator
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
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:$context_receiver_0 index:0 type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun iterator ($context_receiver_0: <root>.CounterConfig): <root>.CounterIterator declared in <root>'
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with declared in kotlin' type=<root>.CounterIterator origin=null
<T>: <root>.CounterConfig
<R>: <root>.CounterIterator
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
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): <root>.CounterIterator declared in <root>.iterator'
CONSTRUCTOR_CALL 'public constructor <init> ($context_receiver_0: <root>.CounterConfig, counter: <root>.Counter) declared in <root>.CounterIterator' type=<root>.CounterIterator origin=null
$context_receiver_0: GET_VAR '$this$with: <root>.CounterConfig declared in <root>.iterator.<anonymous>' type=<root>.CounterConfig origin=null
counter: GET_VAR '<this>: <root>.Counter declared in <root>.iterator' type=<root>.Counter origin=null
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:result type:kotlin.Int [var]
@@ -314,3 +296,21 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST String type=kotlin.String value="fail"
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:$context_receiver_0 index:0 type:<root>.CounterConfig
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun iterator ($context_receiver_0: <root>.CounterConfig): <root>.CounterIterator declared in <root>'
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with declared in kotlin' type=<root>.CounterIterator origin=null
<T>: <root>.CounterConfig
<R>: <root>.CounterIterator
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
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): <root>.CounterIterator declared in <root>.iterator'
CONSTRUCTOR_CALL 'public constructor <init> ($context_receiver_0: <root>.CounterConfig, counter: <root>.Counter) declared in <root>.CounterIterator' type=<root>.CounterIterator origin=null
$context_receiver_0: GET_VAR '$this$with: <root>.CounterConfig declared in <root>.iterator.<anonymous>' type=<root>.CounterConfig origin=null
counter: GET_VAR '<this>: <root>.Counter declared in <root>.iterator' type=<root>.Counter origin=null
@@ -1,15 +1,15 @@
data class Counter {
var i: Int
field = i
get
set
constructor(i: Int = 0) /* primary */ {
super/*Any*/()
/* <init>() */
}
var i: Int
field = i
get
set
operator fun component1(): Int {
return <this>.#i
}
@@ -18,14 +18,6 @@ data class Counter {
return Counter(i = i)
}
override fun toString(): String {
return "Counter(" + "i=" + <this>.#i + ")"
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -40,19 +32,27 @@ data class Counter {
return true
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
override fun toString(): String {
return "Counter(" + "i=" + <this>.#i + ")"
}
}
data class CounterConfig {
val max: Int
field = max
get
constructor(max: Int = 10) /* primary */ {
super/*Any*/()
/* <init>() */
}
val max: Int
field = max
get
operator fun component1(): Int {
return <this>.#max
}
@@ -61,14 +61,6 @@ data class CounterConfig {
return CounterConfig(max = max)
}
override fun toString(): String {
return "CounterConfig(" + "max=" + <this>.#max + ")"
}
override fun hashCode(): Int {
return <this>.#max.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -83,10 +75,22 @@ data class CounterConfig {
return true
}
override fun hashCode(): Int {
return <this>.#max.hashCode()
}
override fun toString(): String {
return "CounterConfig(" + "max=" + <this>.#max + ")"
}
}
class CounterIterator : Iterator<Int> {
private /* final field */ val contextReceiverField0: CounterConfig
private val counter: Counter
field = counter
private get
constructor($context_receiver_0: CounterConfig, counter: Counter) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = $context_receiver_0
@@ -94,10 +98,6 @@ class CounterIterator : Iterator<Int> {
}
private val counter: Counter
field = counter
private get
override operator fun hasNext(): Boolean {
return less(arg0 = <this>.<get-counter>().<get-i>(), arg1 = <this>.#contextReceiverField0.<get-max>())
}
@@ -115,13 +115,6 @@ class CounterIterator : Iterator<Int> {
}
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($context_receiver_0 = $this$with, counter = <this>)
}
)
}
fun box(): String {
var result: Int = 0
with<CounterConfig, Unit>(receiver = CounterConfig(), block = local fun CounterConfig.<anonymous>() {
@@ -141,3 +134,11 @@ fun box(): String {
else -> "fail"
}
}
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($context_receiver_0 = $this$with, counter = <this>)
}
)
}
@@ -15,23 +15,6 @@ 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 <> ($context_receiver_0:<root>.Lazy<kotlin.Int>, $context_receiver_1:<root>.Lazy<kotlin.CharSequence>) returnType:kotlin.Unit
contextReceiverParametersCount: 2
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>, $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:$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>, $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:$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
VALUE_PARAMETER name:lazy1 index:0 type:<root>.Lazy<kotlin.Int>
@@ -153,3 +136,20 @@ FILE fqName:<root> fileName:/lazy.kt
<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
$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
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:$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>, $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:$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>, $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:$context_receiver_0 index:0 type:<root>.Lazy<<root>.Lazy<T of <root>.test3>>
BLOCK_BODY
@@ -1,15 +1,6 @@
interface Lazy<T : Any?> {
}
fun test1($context_receiver_0: Lazy<Int>, $context_receiver_1: Lazy<CharSequence>) {
}
fun <T : Any?> Lazy<Int>.test2($context_receiver_0: 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>() {
@@ -51,3 +42,13 @@ fun <T : Any?> f(lazy1: Lazy<Int>, lazy2: Lazy<CharSequence>, lazyT: Lazy<T>, la
}
)
}
fun test1($context_receiver_0: Lazy<Int>, $context_receiver_1: Lazy<CharSequence>) {
}
fun <T : Any?> Lazy<Int>.test2($context_receiver_0: Lazy<T>) {
}
fun <T : Any?> Lazy<Int>.test3($context_receiver_0: Lazy<Lazy<T>>) {
}
@@ -1,4 +1,12 @@
FILE fqName:<root> fileName:/overloading.kt
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 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, $context_receiver_1:kotlin.String) returnType:kotlin.Int
contextReceiverParametersCount: 2
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
@@ -8,14 +16,6 @@ FILE fqName:<root> fileName:/overloading.kt
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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 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
@@ -1,8 +1,8 @@
fun foo($context_receiver_0: Int, $context_receiver_1: String): Int {
fun foo($context_receiver_0: Int): Int {
return $context_receiver_0.plus(other = 42)
}
fun foo($context_receiver_0: Int): Int {
fun foo($context_receiver_0: Int, $context_receiver_1: String): Int {
return $context_receiver_0.plus(other = 42)
}
@@ -12,3 +12,4 @@ fun test() {
}
) /*~> Unit */
}
@@ -1,10 +1,6 @@
FILE fqName:<root> fileName:/passingLambdaToContextualParam.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> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:result visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:result type:kotlin.String visibility:private [final]
EXPRESSION_BODY
@@ -16,6 +12,10 @@ FILE fqName:<root> fileName:/passingLambdaToContextualParam.kt
RETURN type=kotlin.Nothing from='public final fun <get-result> (): kotlin.String declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:result type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-result>' type=<root>.C origin=null
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C 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 declared in kotlin.Any
@@ -29,13 +29,6 @@ FILE fqName:<root> fileName:/passingLambdaToContextualParam.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:contextual visibility:public modality:FINAL <> (f:kotlin.Function1<<root>.C, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:f index:0 type:kotlin.Function1<<root>.C, kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun contextual (f: kotlin.Function1<<root>.C, kotlin.String>): kotlin.String declared in <root>'
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.String origin=INVOKE
$this: GET_VAR 'f: kotlin.Function1<<root>.C, kotlin.String> declared in <root>.contextual' type=kotlin.Function1<<root>.C, kotlin.String> origin=VARIABLE_AS_FUNCTION
p1: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.C' type=<root>.C 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>'
@@ -48,3 +41,10 @@ FILE fqName:<root> fileName:/passingLambdaToContextualParam.kt
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 '$context_receiver_0: <root>.C declared in <root>.box.<anonymous>' type=<root>.C origin=null
FUN name:contextual visibility:public modality:FINAL <> (f:kotlin.Function1<<root>.C, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:f index:0 type:kotlin.Function1<<root>.C, kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun contextual (f: kotlin.Function1<<root>.C, kotlin.String>): kotlin.String declared in <root>'
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.String origin=INVOKE
$this: GET_VAR 'f: kotlin.Function1<<root>.C, kotlin.String> declared in <root>.contextual' type=kotlin.Function1<<root>.C, kotlin.String> origin=VARIABLE_AS_FUNCTION
p1: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.C' type=<root>.C origin=null
@@ -1,18 +1,14 @@
class C {
val result: String
field = "OK"
get
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val result: String
field = "OK"
get
}
fun contextual(f: Function1<C, String>): String {
return f.invoke(p1 = C())
}
fun box(): String {
@@ -21,3 +17,8 @@ fun box(): String {
}
)
}
fun contextual(f: Function1<C, String>): String {
return f.invoke(p1 = C())
}
@@ -1,10 +1,6 @@
FILE fqName:<root> fileName:/passingLambdaToContextualParam.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> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:result visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:result type:kotlin.String visibility:private [final]
EXPRESSION_BODY
@@ -16,6 +12,10 @@ FILE fqName:<root> fileName:/passingLambdaToContextualParam.kt
RETURN type=kotlin.Nothing from='public final fun <get-result> (): kotlin.String declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:result type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-result>' type=<root>.C origin=null
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C 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 declared in kotlin.Any
@@ -29,13 +29,6 @@ FILE fqName:<root> fileName:/passingLambdaToContextualParam.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:contextual visibility:public modality:FINAL <> (f:@[ContextFunctionTypeParams(count = 1)] kotlin.Function1<<root>.C, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:f index:0 type:@[ContextFunctionTypeParams(count = 1)] kotlin.Function1<<root>.C, kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun contextual (f: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1<<root>.C, kotlin.String>): kotlin.String declared in <root>'
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.String origin=INVOKE
$this: GET_VAR 'f: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1<<root>.C, kotlin.String> declared in <root>.contextual' type=@[ContextFunctionTypeParams(count = 1)] kotlin.Function1<<root>.C, kotlin.String> origin=VARIABLE_AS_FUNCTION
p1: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.C' type=<root>.C 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>'
@@ -48,3 +41,10 @@ FILE fqName:<root> fileName:/passingLambdaToContextualParam.kt
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 '$context_receiver_0: <root>.C declared in <root>.box.<anonymous>' type=<root>.C origin=null
FUN name:contextual visibility:public modality:FINAL <> (f:@[ContextFunctionTypeParams(count = 1)] kotlin.Function1<<root>.C, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:f index:0 type:@[ContextFunctionTypeParams(count = 1)] kotlin.Function1<<root>.C, kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun contextual (f: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1<<root>.C, kotlin.String>): kotlin.String declared in <root>'
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.String origin=INVOKE
$this: GET_VAR 'f: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1<<root>.C, kotlin.String> declared in <root>.contextual' type=@[ContextFunctionTypeParams(count = 1)] kotlin.Function1<<root>.C, kotlin.String> origin=VARIABLE_AS_FUNCTION
p1: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.C' type=<root>.C origin=null
@@ -1,18 +1,14 @@
class C {
val result: String
field = "OK"
get
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val result: String
field = "OK"
get
}
fun contextual(f: @ContextFunctionTypeParams(count = 1) Function1<C, String>): String {
return f.invoke(p1 = C())
}
fun box(): String {
@@ -21,3 +17,8 @@ fun box(): String {
}
)
}
fun contextual(f: @ContextFunctionTypeParams(count = 1) Function1<C, String>): String {
return f.invoke(p1 = C())
}
@@ -1,23 +1,4 @@
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 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]
@@ -37,6 +18,25 @@ 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
CLASS INTERFACE name:NumberOperations modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.NumberOperations
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 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: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 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
@@ -1,8 +1,3 @@
interface NumberOperations {
abstract fun Number.plus(other: Number): Number
}
class Matrix {
constructor() /* primary */ {
super/*Any*/()
@@ -12,6 +7,11 @@ class Matrix {
}
interface NumberOperations {
abstract fun Number.plus(other: Number): Number
}
fun Matrix.plus($context_receiver_0: NumberOperations, other: Matrix): Matrix {
return TODO()
}
@@ -20,3 +20,4 @@ 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 */
}
@@ -1,25 +1,23 @@
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 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 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: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 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 declared in kotlin.Any
@@ -33,6 +31,8 @@ FILE fqName:<root> fileName:/property.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:b visibility:public modality:ABSTRACT <> ($this:<root>.B) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.B
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]
@@ -2,11 +2,6 @@ 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> () 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
@@ -18,6 +13,11 @@ FILE fqName:<root> fileName:/thisWithCustomLabel.kt
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
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> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A 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 declared in kotlin.Any
@@ -33,11 +33,6 @@ FILE fqName:<root> fileName:/thisWithCustomLabel.kt
$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> () 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
@@ -49,6 +44,11 @@ FILE fqName:<root> fileName:/thisWithCustomLabel.kt
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
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> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B 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 declared in kotlin.Any
@@ -64,11 +64,6 @@ FILE fqName:<root> fileName:/thisWithCustomLabel.kt
$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> () 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
@@ -80,6 +75,11 @@ FILE fqName:<root> fileName:/thisWithCustomLabel.kt
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
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> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C 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 declared in kotlin.Any
@@ -1,40 +1,40 @@
class A<T : Any?> {
val a: T
field = a
get
constructor(a: T) /* primary */ {
super/*Any*/()
/* <init>() */
}
val a: T
field = a
get
}
class B {
val b: Any
field = b
get
constructor(b: Any) /* primary */ {
super/*Any*/()
/* <init>() */
}
val b: Any
field = b
get
}
class C {
val c: Any
field = c
get
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) {
@@ -53,3 +53,4 @@ val C.p: Int
<this>.<get-c>() /*~> Unit */
return 1
}
@@ -1,10 +1,4 @@
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.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with declared in kotlin' type=kotlin.Unit origin=null
@@ -25,3 +19,9 @@ FILE fqName:<root> fileName:/typeParameterAsContextReceiver.kt
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
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
@@ -1,6 +1,3 @@
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) {
@@ -10,3 +7,7 @@ fun test() {
}
)
}
fun <T : Any?> useContext($context_receiver_0: T, block: Function1<T, Unit>) {
}
@@ -1,11 +1,21 @@
FILE fqName:<root> fileName:/unaryOperators.kt
PROPERTY name:operationScore visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-operationScore> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-operationScore> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-operationScore> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
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
CLASS CLASS name:Result modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Result
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.Result [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Result modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:i visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
@@ -17,6 +27,11 @@ FILE fqName:<root> fileName:/unaryOperators.kt
RETURN type=kotlin.Nothing from='public final fun <get-i> (): kotlin.Int declared in <root>.Result'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.<get-i>' type=<root>.Result origin=null
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.Result [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Result modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Result) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
@@ -33,27 +48,6 @@ FILE fqName:<root> fileName:/unaryOperators.kt
RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): <root>.Result declared in <root>.Result'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: GET_VAR 'i: kotlin.Int declared in <root>.Result.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Result("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Result'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.hashCode' type=<root>.Result origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Result, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -88,89 +82,27 @@ FILE fqName:<root> fileName:/unaryOperators.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Result'
CONST Boolean type=kotlin.Boolean value=true
PROPERTY name:operationScore visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-operationScore> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-operationScore> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-operationScore> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Result'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.hashCode' type=<root>.Result origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
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, $context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$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, $context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: WHEN type=kotlin.Int 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 <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
arg1: CONST Int type=kotlin.Int value=0
then: CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$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>.unaryPlus' type=<root>.Result origin=null
BRANCH
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, $context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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, $context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int 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>.dec' type=<root>.Result origin=null
other: CONST Int type=kotlin.Int value=1
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Result("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
CONST String type=kotlin.String value=")"
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:result type:<root>.Result [var]
@@ -239,3 +171,71 @@ FILE fqName:<root> fileName:/unaryOperators.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST String type=kotlin.String value="fail"
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:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int 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>.dec' type=<root>.Result origin=null
other: CONST Int type=kotlin.Int value=1
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:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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: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:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$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, $context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: WHEN type=kotlin.Int 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 <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
arg1: CONST Int type=kotlin.Int value=0
then: CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$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>.unaryPlus' type=<root>.Result origin=null
BRANCH
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
@@ -1,14 +1,19 @@
var operationScore: Int
field = 0
get
set
data class Result {
val i: Int
field = i
get
constructor(i: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
val i: Int
field = i
get
operator fun component1(): Int {
return <this>.#i
}
@@ -17,14 +22,6 @@ data class Result {
return Result(i = i)
}
override fun toString(): String {
return "Result(" + "i=" + <this>.#i + ")"
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -39,34 +36,14 @@ data class Result {
return true
}
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
var operationScore: Int
field = 0
get
set
override fun toString(): String {
return "Result(" + "i=" + <this>.#i + ")"
}
operator fun Result.unaryMinus($context_receiver_0: Int): Result {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return Result(i = <this>.<get-i>().unaryMinus())
}
operator fun Result.unaryPlus($context_receiver_0: Int): Result {
<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()
else -> <this>.<get-i>()
})
}
operator fun Result.inc($context_receiver_0: Int): Result {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return Result(i = <this>.<get-i>().plus(other = 1))
}
operator fun Result.dec($context_receiver_0: Int): Result {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return Result(i = <this>.<get-i>().minus(other = 1))
}
fun box(): String {
@@ -100,3 +77,26 @@ fun box(): String {
}
}
operator fun Result.dec($context_receiver_0: Int): Result {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return Result(i = <this>.<get-i>().minus(other = 1))
}
operator fun Result.inc($context_receiver_0: Int): Result {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return Result(i = <this>.<get-i>().plus(other = 1))
}
operator fun Result.unaryMinus($context_receiver_0: Int): Result {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return Result(i = <this>.<get-i>().unaryMinus())
}
operator fun Result.unaryPlus($context_receiver_0: Int): Result {
<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()
else -> <this>.<get-i>()
})
}
@@ -1,11 +1,21 @@
FILE fqName:<root> fileName:/unaryOperators.kt
PROPERTY name:operationScore visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-operationScore> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-operationScore> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-operationScore> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
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
CLASS CLASS name:Result modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Result
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.Result [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Result modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:i visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
@@ -17,6 +27,11 @@ FILE fqName:<root> fileName:/unaryOperators.kt
RETURN type=kotlin.Nothing from='public final fun <get-i> (): kotlin.Int declared in <root>.Result'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.<get-i>' type=<root>.Result origin=null
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.Result [primary]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Result modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Result) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
@@ -33,27 +48,6 @@ FILE fqName:<root> fileName:/unaryOperators.kt
RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): <root>.Result declared in <root>.Result'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: GET_VAR 'i: kotlin.Int declared in <root>.Result.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Result("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Result'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.hashCode' type=<root>.Result origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Result, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -88,93 +82,27 @@ FILE fqName:<root> fileName:/unaryOperators.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Result'
CONST Boolean type=kotlin.Boolean value=true
PROPERTY name:operationScore visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-operationScore> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-operationScore> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-operationScore> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:operationScore visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Result'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.hashCode' type=<root>.Result origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Result
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, $context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun unaryMinus (): kotlin.Int 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, $context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: WHEN type=kotlin.Int 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 <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
arg1: CONST Int type=kotlin.Int value=0
then: CALL 'public final fun unaryMinus (): kotlin.Int 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>.unaryPlus' type=<root>.Result origin=null
BRANCH
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, $context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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, $context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int 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>.dec' type=<root>.Result origin=null
other: CONST Int type=kotlin.Int value=1
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Result("
CONST String type=kotlin.String value="i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
CONST String type=kotlin.String value=")"
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:result type:<root>.Result [var]
@@ -243,3 +171,75 @@ FILE fqName:<root> fileName:/unaryOperators.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST String type=kotlin.String value="fail"
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:$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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int 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>.dec' type=<root>.Result origin=null
other: CONST Int type=kotlin.Int value=1
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:$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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int 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: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:$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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CALL 'public final fun unaryMinus (): kotlin.Int 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, $context_receiver_0:kotlin.Int) returnType:<root>.Result [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.Result
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 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 '$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 declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: WHEN type=kotlin.Int 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 <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
arg1: CONST Int type=kotlin.Int value=0
then: CALL 'public final fun unaryMinus (): kotlin.Int 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>.unaryPlus' type=<root>.Result origin=null
BRANCH
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
@@ -1,14 +1,19 @@
var operationScore: Int
field = 0
get
set
data class Result {
val i: Int
field = i
get
constructor(i: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
val i: Int
field = i
get
operator fun component1(): Int {
return <this>.#i
}
@@ -17,14 +22,6 @@ data class Result {
return Result(i = i)
}
override fun toString(): String {
return "Result(" + "i=" + <this>.#i + ")"
}
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -39,42 +36,14 @@ data class Result {
return true
}
}
var operationScore: Int
field = 0
get
set
operator fun Result.unaryMinus($context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
override fun hashCode(): Int {
return <this>.#i.hashCode()
}
return Result(i = <this>.<get-i>().unaryMinus())
}
operator fun Result.unaryPlus($context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
override fun toString(): String {
return "Result(" + "i=" + <this>.#i + ")"
}
return Result(i = when {
less(arg0 = <this>.<get-i>(), arg1 = 0) -> <this>.<get-i>().unaryMinus()
else -> <this>.<get-i>()
})
}
operator fun Result.inc($context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
return Result(i = <this>.<get-i>().plus(other = 1))
}
operator fun Result.dec($context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
return Result(i = <this>.<get-i>().minus(other = 1))
}
fun box(): String {
@@ -107,3 +76,35 @@ fun box(): String {
else -> "fail"
}
}
operator fun Result.dec($context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
return Result(i = <this>.<get-i>().minus(other = 1))
}
operator fun Result.inc($context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
return Result(i = <this>.<get-i>().plus(other = 1))
}
operator fun Result.unaryMinus($context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
}
return Result(i = <this>.<get-i>().unaryMinus())
}
operator fun Result.unaryPlus($context_receiver_0: Int): Result {
{ // BLOCK
<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()
else -> <this>.<get-i>()
})
}