[Tests] Use stable order for ir/kotlinLike dumps
^KT-65406
This commit is contained in:
committed by
Space Team
parent
0fa42a9c11
commit
e6f4d6e6fa
+54
-54
@@ -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
|
||||
|
||||
+16
-15
@@ -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 {
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+93
-93
@@ -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
|
||||
|
||||
+33
-33
@@ -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>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+93
-93
@@ -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
|
||||
|
||||
+34
-33
@@ -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>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+16
-16
@@ -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
|
||||
|
||||
+10
-9
@@ -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>)
|
||||
}
|
||||
|
||||
|
||||
Vendored
+73
-73
@@ -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
|
||||
|
||||
Vendored
+17
-16
@@ -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())
|
||||
}
|
||||
|
||||
|
||||
+73
-73
@@ -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
|
||||
|
||||
+17
-16
@@ -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())
|
||||
}
|
||||
|
||||
|
||||
+76
-76
@@ -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
|
||||
|
||||
+21
-20
@@ -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)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+76
-76
@@ -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
|
||||
|
||||
+21
-20
@@ -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)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user