FIR: support copy functions in data classes

This commit is contained in:
Mikhail Glukhikh
2019-05-16 11:14:43 +03:00
parent d9261acdfc
commit 2bf80ff64e
17 changed files with 341 additions and 16 deletions
@@ -28,7 +28,16 @@ FILE fqName:<root> fileName:/lambdaInDataClassDefaultParameter.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit> declared in <root>.A'
CALL 'public final fun <get-runA> (): kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit> declared in <root>.A' type=kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
FUN name:copy visibility:public modality:FINAL <> ($this:<root>.A, runA:kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit>) returnType:<root>.A
$this: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:runA index:0 type:kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit>
EXPRESSION_BODY
CALL 'public final fun <get-runA> (): kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit> declared in <root>.A' type=kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit> origin=null
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun copy (runA: kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit>): <root>.A declared in <root>.A'
CONSTRUCTOR_CALL 'public constructor <init> (runA: kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit>) [primary] declared in <root>.A' type=<root>.A origin=null
runA: GET_VAR 'runA: kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit> declared in <root>.A.copy' type=IrErrorType origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -73,7 +82,16 @@ FILE fqName:<root> fileName:/lambdaInDataClassDefaultParameter.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Any declared in <root>.B'
CALL 'public final fun <get-x> (): kotlin.Any declared in <root>.B' type=kotlin.Any origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
FUN name:copy visibility:public modality:FINAL <> ($this:<root>.B, x:kotlin.Any) returnType:<root>.B
$this: VALUE_PARAMETER name:<this> type:<root>.B
VALUE_PARAMETER name:x index:0 type:kotlin.Any
EXPRESSION_BODY
CALL 'public final fun <get-x> (): kotlin.Any declared in <root>.B' type=kotlin.Any origin=null
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.Any): <root>.B declared in <root>.B'
CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Any) [primary] declared in <root>.B' type=<root>.B origin=null
x: GET_VAR 'x: kotlin.Any declared in <root>.B.copy' type=IrErrorType origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any