Files
anzhela.sukhanova 82255d5ee8 [Test] KT-61360: add tests for the IrFakeOverrideBuilder
Add tests for fake overrides with focus on java interoperability

Co-authored-by: Aleksandra Arsenteva <aleksandra.arsenteva@jetbrains.com>
2024-03-04 16:21:02 +00:00

120 lines
8.5 KiB
Plaintext
Vendored

FILE fqName:<root> fileName:/test.kt
CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
PROPERTY name:a1 visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:a1 type:kotlin.Int visibility:private
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a1> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Int
correspondingProperty: PROPERTY name:a1 visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-a1> (): kotlin.Int declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a1 type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-a1>' type=<root>.A origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-a1> visibility:public modality:FINAL <> ($this:<root>.A, <set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:a1 visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a1 type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<set-a1>' type=<root>.A origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.A.<set-a1>' type=kotlin.Int origin=null
PROPERTY name:a2 visibility:protected modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:a2 type:kotlin.Int visibility:private
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a2> visibility:protected modality:FINAL <> ($this:<root>.A) returnType:kotlin.Int
correspondingProperty: PROPERTY name:a2 visibility:protected modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='protected final fun <get-a2> (): kotlin.Int declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a2 type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-a2>' type=<root>.A origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-a2> visibility:protected modality:FINAL <> ($this:<root>.A, <set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:a2 visibility:protected modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a2 type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<set-a2>' type=<root>.A origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.A.<set-a2>' type=kotlin.Int origin=null
CONSTRUCTOR visibility:public <> () returnType:<root>.A [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[kotlin.Any]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:B modality:FINAL visibility:public superTypes:[<root>.J]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B
CONSTRUCTOR visibility:public <> () returnType:<root>.B [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.J'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[<root>.J]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.J
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.J
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.J
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY FAKE_OVERRIDE name:a1 visibility:public modality:OPEN [fake_override,var]
overridden:
public open a1: kotlin.Int
FUN FAKE_OVERRIDE name:<get-a1> visibility:public modality:OPEN <> ($this:<root>.J) returnType:kotlin.Int [fake_override]
annotations:
Override
correspondingProperty: PROPERTY FAKE_OVERRIDE name:a1 visibility:public modality:OPEN [fake_override,var]
overridden:
public open fun <get-a1> (): kotlin.Int declared in <root>.J
$this: VALUE_PARAMETER name:<this> type:<root>.J
FUN FAKE_OVERRIDE name:<set-a1> visibility:public modality:OPEN <> ($this:<root>.J, <set-?>:kotlin.Int) returnType:kotlin.Unit [fake_override]
annotations:
Override
correspondingProperty: PROPERTY FAKE_OVERRIDE name:a1 visibility:public modality:OPEN [fake_override,var]
overridden:
public open fun <set-a1> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.J
$this: VALUE_PARAMETER name:<this> type:<root>.J
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
PROPERTY FAKE_OVERRIDE name:a2 visibility:protected/*protected and package*/ modality:OPEN [fake_override,var]
overridden:
protected/*protected and package*/ open a2: kotlin.Int
FUN FAKE_OVERRIDE name:<get-a2> visibility:protected/*protected and package*/ modality:OPEN <> ($this:<root>.J) returnType:kotlin.Int [fake_override]
annotations:
Override
correspondingProperty: PROPERTY FAKE_OVERRIDE name:a2 visibility:protected/*protected and package*/ modality:OPEN [fake_override,var]
overridden:
protected/*protected and package*/ open fun <get-a2> (): kotlin.Int declared in <root>.J
$this: VALUE_PARAMETER name:<this> type:<root>.J
FUN FAKE_OVERRIDE name:<set-a2> visibility:protected/*protected and package*/ modality:OPEN <> ($this:<root>.J, <set-?>:kotlin.Int) returnType:kotlin.Unit [fake_override]
annotations:
Override
correspondingProperty: PROPERTY FAKE_OVERRIDE name:a2 visibility:protected/*protected and package*/ modality:OPEN [fake_override,var]
overridden:
protected/*protected and package*/ open fun <set-a2> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.J
$this: VALUE_PARAMETER name:<this> type:<root>.J
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
FUN name:test visibility:public modality:FINAL <> (b:<root>.B) returnType:kotlin.Unit
VALUE_PARAMETER name:b index:0 type:<root>.B
BLOCK_BODY
CALL 'public open fun <set-a1> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.B' type=kotlin.Unit origin=EQ
$this: GET_VAR 'b: <root>.B declared in <root>.test' type=<root>.B origin=null
<set-?>: CONST Int type=kotlin.Int value=1