[K/N] Reorder hashCode, toString, equals in data classes to match K1 order
^KT-60247 Fixed Merge-request: KT-MR-11080 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
a4a0da267e
commit
f9df4e1487
Vendored
+21
-21
@@ -41,6 +41,27 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): <root>.MyContainer declared in <root>.MyContainer'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
|
||||
i: GET_VAR 'i: kotlin.Int declared in <root>.MyContainer.copy' type=kotlin.Int origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="MyContainer("
|
||||
CONST String type=kotlin.String value="i="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.MyContainer, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
@@ -75,27 +96,6 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.MyContainer'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="MyContainer("
|
||||
CONST String type=kotlin.String value="i="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
PROPERTY name:operationScore visibility:public modality:FINAL [var]
|
||||
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
|
||||
EXPRESSION_BODY
|
||||
|
||||
Vendored
+9
-8
@@ -18,6 +18,14 @@ data class MyContainer {
|
||||
return MyContainer(i = i)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "MyContainer(" + "i=" + <this>.#i + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#i.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -32,14 +40,6 @@ data class MyContainer {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#i.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "MyContainer(" + "i=" + <this>.#i + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var operationScore: Int
|
||||
@@ -83,3 +83,4 @@ fun box(): String {
|
||||
else -> "fail"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+21
-21
@@ -41,6 +41,27 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (s: kotlin.String): <root>.MyContainer declared in <root>.MyContainer'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
|
||||
s: GET_VAR 's: kotlin.String declared in <root>.MyContainer.copy' type=kotlin.String origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="MyContainer("
|
||||
CONST String type=kotlin.String value="s="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.MyContainer, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
@@ -75,27 +96,6 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.MyContainer'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="MyContainer("
|
||||
CONST String type=kotlin.String value="s="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN name:get visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, $context_receiver_0:kotlin.Int, index:kotlin.Int) returnType:kotlin.String? [operator]
|
||||
contextReceiverParametersCount: 1
|
||||
$receiver: VALUE_PARAMETER name:<this> type:<root>.MyContainer
|
||||
|
||||
+9
-8
@@ -18,6 +18,14 @@ data class MyContainer {
|
||||
return MyContainer(s = s)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "MyContainer(" + "s=" + <this>.#s + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#s.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -32,14 +40,6 @@ data class MyContainer {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#s.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "MyContainer(" + "s=" + <this>.#s + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
operator fun MyContainer.get($context_receiver_0: Int, index: Int): String? {
|
||||
@@ -76,3 +76,4 @@ fun box(): String {
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Vendored
+21
-21
@@ -41,6 +41,27 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): <root>.Result declared in <root>.Result'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
|
||||
i: GET_VAR 'i: kotlin.Int declared in <root>.Result.copy' type=kotlin.Int origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Result
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="Result("
|
||||
CONST String type=kotlin.String value="i="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Result
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Result'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.hashCode' type=<root>.Result origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Result, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
@@ -75,27 +96,6 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Result'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Result
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Result'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.hashCode' type=<root>.Result origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Result
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="Result("
|
||||
CONST String type=kotlin.String value="i="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
PROPERTY name:operationScore visibility:public modality:FINAL [var]
|
||||
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
|
||||
EXPRESSION_BODY
|
||||
|
||||
Vendored
+9
-8
@@ -18,6 +18,14 @@ data class Result {
|
||||
return Result(i = i)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Result(" + "i=" + <this>.#i + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#i.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -32,14 +40,6 @@ data class Result {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#i.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Result(" + "i=" + <this>.#i + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var operationScore: Int
|
||||
@@ -104,3 +104,4 @@ fun box(): String {
|
||||
else -> "fail"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+53
-53
@@ -60,6 +60,59 @@ 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
|
||||
@@ -104,59 +157,6 @@ 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 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: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: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
|
||||
|
||||
+17
-16
@@ -25,6 +25,22 @@ 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
|
||||
@@ -42,22 +58,6 @@ data class Pair<A : Any?, B : Any?> {
|
||||
return true
|
||||
}
|
||||
|
||||
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 + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
infix operator fun <T : Any?> T.compareTo($context_receiver_0: Comparator<T>, other: T): Int {
|
||||
@@ -88,3 +88,4 @@ fun box(): String {
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+42
-42
@@ -43,6 +43,27 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): <root>.Counter declared in <root>.Counter'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Counter' type=<root>.Counter origin=null
|
||||
i: GET_VAR 'i: kotlin.Int declared in <root>.Counter.copy' type=kotlin.Int origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Counter) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Counter'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="Counter("
|
||||
CONST String type=kotlin.String value="i="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.toString' type=<root>.Counter origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Counter) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Counter'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.hashCode' type=<root>.Counter origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Counter, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
@@ -77,27 +98,6 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Counter'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Counter) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Counter'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.hashCode' type=<root>.Counter origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Counter) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Counter
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Counter'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="Counter("
|
||||
CONST String type=kotlin.String value="i="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.toString' type=<root>.Counter origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
CLASS CLASS name:CounterConfig modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CounterConfig
|
||||
CONSTRUCTOR visibility:public <> (max:kotlin.Int) returnType:<root>.CounterConfig [primary]
|
||||
@@ -134,6 +134,27 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (max: kotlin.Int): <root>.CounterConfig declared in <root>.CounterConfig'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (max: kotlin.Int) declared in <root>.CounterConfig' type=<root>.CounterConfig origin=null
|
||||
max: GET_VAR 'max: kotlin.Int declared in <root>.CounterConfig.copy' type=kotlin.Int origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.CounterConfig) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.CounterConfig'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="CounterConfig("
|
||||
CONST String type=kotlin.String value="max="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.toString' type=<root>.CounterConfig origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.CounterConfig) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.CounterConfig'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.hashCode' type=<root>.CounterConfig origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.CounterConfig, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
@@ -168,27 +189,6 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.CounterConfig'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.CounterConfig) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.CounterConfig'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.hashCode' type=<root>.CounterConfig origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.CounterConfig) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.CounterConfig
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.CounterConfig'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="CounterConfig("
|
||||
CONST String type=kotlin.String value="max="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.toString' type=<root>.CounterConfig origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
CLASS CLASS name:CounterIterator modality:FINAL visibility:public superTypes:[kotlin.collections.Iterator<kotlin.Int>]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CounterIterator
|
||||
FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:<root>.CounterConfig visibility:private [final]
|
||||
|
||||
+17
-16
@@ -18,6 +18,14 @@ data class Counter {
|
||||
return Counter(i = i)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Counter(" + "i=" + <this>.#i + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#i.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -32,14 +40,6 @@ data class Counter {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#i.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Counter(" + "i=" + <this>.#i + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data class CounterConfig {
|
||||
@@ -61,6 +61,14 @@ data class CounterConfig {
|
||||
return CounterConfig(max = max)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "CounterConfig(" + "max=" + <this>.#max + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#max.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -75,14 +83,6 @@ data class CounterConfig {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#max.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "CounterConfig(" + "max=" + <this>.#max + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class CounterIterator : Iterator<Int> {
|
||||
@@ -139,3 +139,4 @@ fun box(): String {
|
||||
else -> "fail"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+21
-21
@@ -33,6 +33,27 @@ FILE fqName:<root> fileName:/unaryOperators.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): <root>.Result declared in <root>.Result'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
|
||||
i: GET_VAR 'i: kotlin.Int declared in <root>.Result.copy' type=kotlin.Int origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Result
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="Result("
|
||||
CONST String type=kotlin.String value="i="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Result
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Result'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.hashCode' type=<root>.Result origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Result, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
@@ -67,27 +88,6 @@ FILE fqName:<root> fileName:/unaryOperators.kt
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Result'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Result
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Result'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.hashCode' type=<root>.Result origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Result) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Result
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="Result("
|
||||
CONST String type=kotlin.String value="i="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
PROPERTY name:operationScore visibility:public modality:FINAL [var]
|
||||
FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]
|
||||
EXPRESSION_BODY
|
||||
|
||||
+9
-8
@@ -17,6 +17,14 @@ data class Result {
|
||||
return Result(i = i)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Result(" + "i=" + <this>.#i + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#i.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -31,14 +39,6 @@ data class Result {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#i.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Result(" + "i=" + <this>.#i + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var operationScore: Int
|
||||
@@ -99,3 +99,4 @@ fun box(): String {
|
||||
else -> "fail"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+42
-42
@@ -17,6 +17,27 @@ FILE fqName:<root> fileName:/inlineCollectionOfInlineClass.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Int declared in <root>.IT'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.IT declared in <root>.IT.<get-x>' type=<root>.IT origin=null
|
||||
FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.IT) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.IT
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.IT'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="IT("
|
||||
CONST String type=kotlin.String value="x="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.IT declared in <root>.IT.toString' type=<root>.IT origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.IT) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.IT
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.IT'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.IT declared in <root>.IT.hashCode' type=<root>.IT origin=null
|
||||
FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.IT, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
@@ -44,27 +65,6 @@ FILE fqName:<root> fileName:/inlineCollectionOfInlineClass.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>.IT'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.IT) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.IT
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.IT'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.IT declared in <root>.IT.hashCode' type=<root>.IT origin=null
|
||||
FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.IT) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.IT
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.IT'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="IT("
|
||||
CONST String type=kotlin.String value="x="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.IT declared in <root>.IT.toString' type=<root>.IT origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
CLASS CLASS name:InlineMutableSet modality:FINAL visibility:public [value] superTypes:[kotlin.collections.MutableSet<<root>.IT>]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.InlineMutableSet
|
||||
CONSTRUCTOR visibility:public <> (ms:kotlin.collections.MutableSet<<root>.IT>) returnType:<root>.InlineMutableSet [primary]
|
||||
@@ -199,6 +199,27 @@ FILE fqName:<root> fileName:/inlineCollectionOfInlineClass.kt
|
||||
$this: CALL 'private final fun <get-ms> (): kotlin.collections.MutableSet<<root>.IT> declared in <root>.InlineMutableSet' type=kotlin.collections.MutableSet<<root>.IT> origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.InlineMutableSet declared in <root>.InlineMutableSet.retainAll' type=<root>.InlineMutableSet origin=null
|
||||
elements: GET_VAR 'elements: kotlin.collections.Collection<<root>.IT> declared in <root>.InlineMutableSet.retainAll' type=kotlin.collections.Collection<<root>.IT> origin=null
|
||||
FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.InlineMutableSet) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.InlineMutableSet
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.InlineMutableSet'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="InlineMutableSet("
|
||||
CONST String type=kotlin.String value="ms="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ms type:kotlin.collections.MutableSet<<root>.IT> visibility:private [final]' type=kotlin.collections.MutableSet<<root>.IT> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.InlineMutableSet declared in <root>.InlineMutableSet.toString' type=<root>.InlineMutableSet origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.InlineMutableSet) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.InlineMutableSet
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.InlineMutableSet'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.collections.MutableSet' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ms type:kotlin.collections.MutableSet<<root>.IT> visibility:private [final]' type=kotlin.collections.MutableSet<<root>.IT> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.InlineMutableSet declared in <root>.InlineMutableSet.hashCode' type=<root>.InlineMutableSet origin=null
|
||||
FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.InlineMutableSet, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
@@ -226,24 +247,3 @@ FILE fqName:<root> fileName:/inlineCollectionOfInlineClass.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>.InlineMutableSet'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.InlineMutableSet) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.InlineMutableSet
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.InlineMutableSet'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.collections.MutableSet' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ms type:kotlin.collections.MutableSet<<root>.IT> visibility:private [final]' type=kotlin.collections.MutableSet<<root>.IT> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.InlineMutableSet declared in <root>.InlineMutableSet.hashCode' type=<root>.InlineMutableSet origin=null
|
||||
FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.InlineMutableSet) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.InlineMutableSet
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.InlineMutableSet'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="InlineMutableSet("
|
||||
CONST String type=kotlin.String value="ms="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ms type:kotlin.collections.MutableSet<<root>.IT> visibility:private [final]' type=kotlin.collections.MutableSet<<root>.IT> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.InlineMutableSet declared in <root>.InlineMutableSet.toString' type=<root>.InlineMutableSet origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
|
||||
+16
-16
@@ -9,6 +9,14 @@ value class IT {
|
||||
field = x
|
||||
get
|
||||
|
||||
override fun toString(): String {
|
||||
return "IT(" + "x=" + <this>.#x + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#x.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
other !is IT -> return false
|
||||
@@ -20,14 +28,6 @@ value class IT {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#x.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "IT(" + "x=" + <this>.#x + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
value class InlineMutableSet : MutableSet<IT> {
|
||||
@@ -86,6 +86,14 @@ value class InlineMutableSet : MutableSet<IT> {
|
||||
return <this>.<get-ms>().retainAll(elements = elements)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "InlineMutableSet(" + "ms=" + <this>.#ms + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#ms.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
other !is InlineMutableSet -> return false
|
||||
@@ -97,13 +105,5 @@ value class InlineMutableSet : MutableSet<IT> {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#ms.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "InlineMutableSet(" + "ms=" + <this>.#ms + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+21
-21
@@ -35,6 +35,27 @@ FILE fqName:<root> fileName:/dataClassWithJvmRecord.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (name: kotlin.String): <root>.MyRec declared in <root>.MyRec'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (name: kotlin.String) declared in <root>.MyRec' type=<root>.MyRec origin=null
|
||||
name: GET_VAR 'name: kotlin.String declared in <root>.MyRec.copy' type=kotlin.String origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyRec) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyRec
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyRec'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="MyRec("
|
||||
CONST String type=kotlin.String value="name="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:name type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyRec declared in <root>.MyRec.toString' type=<root>.MyRec origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyRec) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyRec
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyRec'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:name type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyRec declared in <root>.MyRec.hashCode' type=<root>.MyRec origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.MyRec, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
@@ -69,27 +90,6 @@ FILE fqName:<root> fileName:/dataClassWithJvmRecord.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>.MyRec'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.MyRec) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyRec
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyRec'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:name type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyRec declared in <root>.MyRec.hashCode' type=<root>.MyRec origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyRec) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyRec
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyRec'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="MyRec("
|
||||
CONST String type=kotlin.String value="name="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:name type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyRec declared in <root>.MyRec.toString' type=<root>.MyRec origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN name:test visibility:public modality:FINAL <> (rec:<root>.MyRec) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:rec index:0 type:<root>.MyRec
|
||||
BLOCK_BODY
|
||||
|
||||
+9
-8
@@ -18,6 +18,14 @@ data class MyRec : Record {
|
||||
return MyRec(name = name)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "MyRec(" + "name=" + <this>.#name + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#name.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -32,16 +40,9 @@ data class MyRec : Record {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#name.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "MyRec(" + "name=" + <this>.#name + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun test(rec: MyRec) {
|
||||
rec.<get-name>() /*~> Unit */
|
||||
}
|
||||
|
||||
|
||||
+21
-21
@@ -67,6 +67,27 @@ FILE fqName:<root> fileName:/kt52677.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (id: @[MySerializable(c = ...)] <root>.Uuid1): <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (id: @[MySerializable(c = ...)] <root>.Uuid1) declared in <root>.LoginSuccessPacket' type=<root>.LoginSuccessPacket origin=null
|
||||
id: GET_VAR 'id: @[MySerializable(c = ...)] <root>.Uuid1 declared in <root>.LoginSuccessPacket.copy' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.LoginSuccessPacket) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.LoginSuccessPacket
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.LoginSuccessPacket'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="LoginSuccessPacket("
|
||||
CONST String type=kotlin.String value="id="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] <root>.Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
|
||||
receiver: GET_VAR '<this>: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.toString' type=<root>.LoginSuccessPacket origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.LoginSuccessPacket) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.LoginSuccessPacket
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.LoginSuccessPacket'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] <root>.Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
|
||||
receiver: GET_VAR '<this>: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.hashCode' type=<root>.LoginSuccessPacket origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.LoginSuccessPacket, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
@@ -101,27 +122,6 @@ FILE fqName:<root> fileName:/kt52677.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>.LoginSuccessPacket'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.LoginSuccessPacket) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.LoginSuccessPacket
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.LoginSuccessPacket'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] <root>.Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
|
||||
receiver: GET_VAR '<this>: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.hashCode' type=<root>.LoginSuccessPacket origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.LoginSuccessPacket) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.LoginSuccessPacket
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.LoginSuccessPacket'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="LoginSuccessPacket("
|
||||
CONST String type=kotlin.String value="id="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] <root>.Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
|
||||
receiver: GET_VAR '<this>: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.toString' type=<root>.LoginSuccessPacket origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
CLASS INTERFACE name:MySerializer modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MySerializer<T of <root>.MySerializer>
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
|
||||
|
||||
@@ -32,6 +32,14 @@ data class LoginSuccessPacket {
|
||||
return LoginSuccessPacket(id = id)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "LoginSuccessPacket(" + "id=" + <this>.#id + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#id.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -46,14 +54,6 @@ data class LoginSuccessPacket {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#id.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "LoginSuccessPacket(" + "id=" + <this>.#id + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface MySerializer<T : Any?> {
|
||||
@@ -85,3 +85,4 @@ fun foo(): @MySerializable(c = UuidSerializer::class) Uuid1 {
|
||||
fun bar(): @MySerializable(c = UuidSerializer::class) Uuid1 {
|
||||
return foo()
|
||||
}
|
||||
|
||||
|
||||
-150
@@ -1,150 +0,0 @@
|
||||
FILE fqName:<root> fileName:/dataClassMembers.kt
|
||||
CLASS CLASS name:Test modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test<T of <root>.Test>
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
|
||||
CONSTRUCTOR visibility:public <> (x:T of <root>.Test, y:kotlin.String) returnType:<root>.Test<T of <root>.Test> [primary]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.Test
|
||||
VALUE_PARAMETER name:y index:1 type:kotlin.String
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=""
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
|
||||
PROPERTY name:x visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'x: T of <root>.Test declared in <root>.Test.<init>' type=T of <root>.Test origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Test<T of <root>.Test>) returnType:T of <root>.Test
|
||||
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test<T of <root>.Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-x> (): T of <root>.Test declared in <root>.Test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test visibility:private [final]' type=T of <root>.Test origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.<get-x>' type=<root>.Test<T of <root>.Test> origin=null
|
||||
PROPERTY name:y visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'y: kotlin.String declared in <root>.Test.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:<root>.Test<T of <root>.Test>) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test<T of <root>.Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-y> (): kotlin.String declared in <root>.Test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.<get-y>' type=<root>.Test<T of <root>.Test> origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Test<T of <root>.Test>) returnType:T of <root>.Test [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test<T of <root>.Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun component1 (): T of <root>.Test declared in <root>.Test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test visibility:private [final]' type=T of <root>.Test origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.component1' type=<root>.Test<T of <root>.Test> origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:component2 visibility:public modality:FINAL <> ($this:<root>.Test<T of <root>.Test>) returnType:kotlin.String [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test<T of <root>.Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun component2 (): kotlin.String declared in <root>.Test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.component2' type=<root>.Test<T of <root>.Test> origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.Test<T of <root>.Test>, x:T of <root>.Test, y:kotlin.String) returnType:<root>.Test<T of <root>.Test>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test<T of <root>.Test>
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.Test
|
||||
EXPRESSION_BODY
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test visibility:private [final]' type=T of <root>.Test origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.copy' type=<root>.Test<T of <root>.Test> origin=null
|
||||
VALUE_PARAMETER name:y index:1 type:kotlin.String
|
||||
EXPRESSION_BODY
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.copy' type=<root>.Test<T of <root>.Test> origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (x: T of <root>.Test, y: kotlin.String): <root>.Test<T of <root>.Test> declared in <root>.Test'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (x: T of <root>.Test, y: kotlin.String) declared in <root>.Test' type=<root>.Test<T of <root>.Test> origin=null
|
||||
<class: T>: T of <root>.Test
|
||||
x: GET_VAR 'x: T of <root>.Test declared in <root>.Test.copy' type=T of <root>.Test origin=null
|
||||
y: GET_VAR 'y: kotlin.String declared in <root>.Test.copy' type=kotlin.String origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Test<T of <root>.Test>, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test<T of <root>.Test>
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
|
||||
arg0: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.equals' type=<root>.Test<T of <root>.Test> origin=null
|
||||
arg1: GET_VAR 'other: kotlin.Any? declared in <root>.Test.equals' type=kotlin.Any? origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Test'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.Test<T of <root>.Test>
|
||||
GET_VAR 'other: kotlin.Any? declared in <root>.Test.equals' type=kotlin.Any? origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Test'
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.Test<T of <root>.Test> [val]
|
||||
TYPE_OP type=<root>.Test<T of <root>.Test> origin=CAST typeOperand=<root>.Test<T of <root>.Test>
|
||||
GET_VAR 'other: kotlin.Any? declared in <root>.Test.equals' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test visibility:private [final]' type=T of <root>.Test origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.equals' type=<root>.Test<T of <root>.Test> origin=null
|
||||
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test visibility:private [final]' type=T of <root>.Test origin=null
|
||||
receiver: GET_VAR 'val tmp_0: <root>.Test<T of <root>.Test> declared in <root>.Test.equals' type=<root>.Test<T of <root>.Test> origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Test'
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.equals' type=<root>.Test<T of <root>.Test> origin=null
|
||||
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR 'val tmp_0: <root>.Test<T of <root>.Test> declared in <root>.Test.equals' type=<root>.Test<T of <root>.Test> origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Test'
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Test'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Test<T of <root>.Test>) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test<T of <root>.Test>
|
||||
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:x type:T of <root>.Test visibility:private [final]' type=T of <root>.Test origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.hashCode' type=<root>.Test<T of <root>.Test> 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:x type:T of <root>.Test visibility:private [final]' type=T of <root>.Test origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.hashCode' type=<root>.Test<T of <root>.Test> origin=null
|
||||
SET_VAR 'var result: kotlin.Int declared in <root>.Test.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>.Test.hashCode' type=kotlin.Int origin=null
|
||||
other: CONST Int type=kotlin.Int value=31
|
||||
other: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.hashCode' type=<root>.Test<T of <root>.Test> origin=null
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Test'
|
||||
GET_VAR 'var result: kotlin.Int declared in <root>.Test.hashCode' type=kotlin.Int origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Test<T of <root>.Test>) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test<T of <root>.Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="Test("
|
||||
CONST String type=kotlin.String value="x="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test visibility:private [final]' type=T of <root>.Test origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.toString' type=<root>.Test<T of <root>.Test> origin=null
|
||||
CONST String type=kotlin.String value=", "
|
||||
CONST String type=kotlin.String value="y="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.toString' type=<root>.Test<T of <root>.Test> origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
-59
@@ -1,59 +0,0 @@
|
||||
data class Test<T : Any?> {
|
||||
constructor(x: T, y: String = "") /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: T
|
||||
field = x
|
||||
get
|
||||
|
||||
val y: String
|
||||
field = y
|
||||
get
|
||||
|
||||
operator fun component1(): T {
|
||||
return <this>.#x
|
||||
}
|
||||
|
||||
operator fun component2(): String {
|
||||
return <this>.#y
|
||||
}
|
||||
|
||||
fun copy(x: T = <this>.#x, y: String = <this>.#y): Test<T> {
|
||||
return Test<T>(x = x, y = y)
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is Test<T> -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test<T> = other as Test<T>
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#y, arg1 = tmp0_other_with_cast.#y).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result: Int = when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = null) -> 0
|
||||
else -> <this>.#x.hashCode()
|
||||
}
|
||||
result = result.times(other = 31).plus(other = <this>.#y.hashCode())
|
||||
return result
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
// FIR_IDENTICAL
|
||||
data class Test<T>(val x: T, val y: String = "")
|
||||
|
||||
Reference in New Issue
Block a user