[fir2ir] Set origins for componentN and copy methods of data classes

This aligns the behavior with psi2ir.
This commit is contained in:
Sergej Jaskiewicz
2023-04-06 14:33:36 +02:00
committed by Space Team
parent c718c77c43
commit 4b6975c3d0
26 changed files with 92 additions and 89 deletions
@@ -717,19 +717,19 @@ FILE fqName:<root> fileName:/ArrayMap.kt
RETURN type=kotlin.Nothing from='public open fun <get-value> (): T of <root>.ArrayMapImpl.Entry declared in <root>.ArrayMapImpl.Entry'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.ArrayMapImpl.Entry visibility:private [final]' type=T of <root>.ArrayMapImpl.Entry origin=null
receiver: GET_VAR '<this>: <root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry> declared in <root>.ArrayMapImpl.Entry.<get-value>' type=<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry> origin=null
FUN name:component1 visibility:public modality:FINAL <> ($this:<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry>) returnType:kotlin.Int [operator]
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry>) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int [operator] declared in <root>.ArrayMapImpl.Entry'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:key type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry> declared in <root>.ArrayMapImpl.Entry.component1' type=<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry> origin=null
FUN name:component2 visibility:public modality:FINAL <> ($this:<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry>) returnType:T of <root>.ArrayMapImpl.Entry [operator]
FUN GENERATED_DATA_CLASS_MEMBER name:component2 visibility:public modality:FINAL <> ($this:<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry>) returnType:T of <root>.ArrayMapImpl.Entry [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component2 (): T of <root>.ArrayMapImpl.Entry [operator] declared in <root>.ArrayMapImpl.Entry'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.ArrayMapImpl.Entry visibility:private [final]' type=T of <root>.ArrayMapImpl.Entry origin=null
receiver: GET_VAR '<this>: <root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry> declared in <root>.ArrayMapImpl.Entry.component2' type=<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry> origin=null
FUN name:copy visibility:public modality:FINAL <> ($this:<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry>, key:kotlin.Int, value:T of <root>.ArrayMapImpl.Entry) returnType:<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry>
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry>, key:kotlin.Int, value:T of <root>.ArrayMapImpl.Entry) returnType:<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry>
$this: VALUE_PARAMETER name:<this> type:<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry>
VALUE_PARAMETER name:key index:0 type:kotlin.Int
EXPRESSION_BODY
@@ -18,13 +18,13 @@ FILE fqName:<root> fileName:/MultiList.kt
RETURN type=kotlin.Nothing from='public final fun <get-value> (): T of <root>.Some declared in <root>.Some'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.Some visibility:private [final]' type=T of <root>.Some origin=null
receiver: GET_VAR '<this>: <root>.Some<T of <root>.Some> declared in <root>.Some.<get-value>' type=<root>.Some<T of <root>.Some> origin=null
FUN name:component1 visibility:public modality:FINAL <> ($this:<root>.Some<T of <root>.Some>) returnType:T of <root>.Some [operator]
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Some<T of <root>.Some>) returnType:T of <root>.Some [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Some<T of <root>.Some>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): T of <root>.Some [operator] declared in <root>.Some'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.Some visibility:private [final]' type=T of <root>.Some origin=null
receiver: GET_VAR '<this>: <root>.Some<T of <root>.Some> declared in <root>.Some.component1' type=<root>.Some<T of <root>.Some> origin=null
FUN name:copy visibility:public modality:FINAL <> ($this:<root>.Some<T of <root>.Some>, value:T of <root>.Some) returnType:<root>.Some<T of <root>.Some>
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.Some<T of <root>.Some>, value:T of <root>.Some) returnType:<root>.Some<T of <root>.Some>
$this: VALUE_PARAMETER name:<this> type:<root>.Some<T of <root>.Some>
VALUE_PARAMETER name:value index:0 type:T of <root>.Some
EXPRESSION_BODY
@@ -110,13 +110,13 @@ FILE fqName:<root> fileName:/SignatureClash.kt
RETURN type=kotlin.Nothing from='public final fun <get-delegate> (): <root>.Delegate declared in <root>.DataClass'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.<get-delegate>' type=<root>.DataClass origin=null
FUN name:component1 visibility:public modality:FINAL <> ($this:<root>.DataClass) returnType:<root>.Delegate [operator]
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.DataClass) returnType:<root>.Delegate [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.DataClass
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): <root>.Delegate [operator] declared in <root>.DataClass'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.component1' type=<root>.DataClass origin=null
FUN name:copy visibility:public modality:FINAL <> ($this:<root>.DataClass, delegate:<root>.Delegate) returnType:<root>.DataClass
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.DataClass, delegate:<root>.Delegate) returnType:<root>.DataClass
$this: VALUE_PARAMETER name:<this> type:<root>.DataClass
VALUE_PARAMETER name:delegate index:0 type:<root>.Delegate
EXPRESSION_BODY