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

250 lines
19 KiB
Plaintext
Vendored

FILE fqName:<root> fileName:/1.kt
CLASS CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
PROPERTY name:b visibility:public modality:FINAL [lateinit,var]
FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.Number visibility:public
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-b> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Number
correspondingProperty: PROPERTY name:b visibility:public modality:FINAL [lateinit,var]
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-b> (): kotlin.Number declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.Number visibility:public' type=kotlin.Number origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-b>' type=<root>.A origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-b> visibility:public modality:FINAL <> ($this:<root>.A, <set-?>:kotlin.Number) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:b visibility:public modality:FINAL [lateinit,var]
$this: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Number
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.Number visibility:public' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<set-b>' type=<root>.A origin=null
value: GET_VAR '<set-?>: kotlin.Number declared in <root>.A.<set-b>' type=kotlin.Number origin=null
CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A.Companion
CONSTRUCTOR visibility:private <> () returnType:<root>.A.Companion [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] 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
PROPERTY name:a visibility:public modality:FINAL [const,val]
FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:public [final]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:FINAL <> ($this:<root>.A.Companion) returnType:kotlin.Int
correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [const,val]
$this: VALUE_PARAMETER name:<this> type:<root>.A.Companion
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-a> (): kotlin.Int declared in <root>.A.Companion'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A.Companion declared in <root>.A.Companion.<get-a>' type=<root>.A.Companion 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:OPEN 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>.Java1]
$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>.Java1'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[<root>.Java1]'
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>.Java1
$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>.Java1
$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>.Java1
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY FAKE_OVERRIDE name:b visibility:public modality:FINAL [lateinit,fake_override,var]
overridden:
public final b: kotlin.Number
FUN FAKE_OVERRIDE name:<get-b> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Number [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:b visibility:public modality:FINAL [lateinit,fake_override,var]
overridden:
public final fun <get-b> (): kotlin.Number declared in <root>.Java1
$this: VALUE_PARAMETER name:<this> type:<root>.A
FUN FAKE_OVERRIDE name:<set-b> visibility:public modality:FINAL <> ($this:<root>.A, <set-?>:kotlin.Number) returnType:kotlin.Unit [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:b visibility:public modality:FINAL [lateinit,fake_override,var]
overridden:
public final fun <set-b> (<set-?>: kotlin.Number): kotlin.Unit declared in <root>.Java1
$this: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Number
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.A; <root>.Java2]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.A'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.A; <root>.Java2]'
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>.A
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Java2
$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>.A
public open fun hashCode (): kotlin.Int declared in <root>.Java2
$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>.A
public open fun toString (): kotlin.String declared in <root>.Java2
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY FAKE_OVERRIDE name:b visibility:public modality:FINAL [lateinit,fake_override,var]
overridden:
public final b: kotlin.Number
FUN FAKE_OVERRIDE name:<get-b> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Number [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:b visibility:public modality:FINAL [lateinit,fake_override,var]
overridden:
public final fun <get-b> (): kotlin.Number declared in <root>.A
$this: VALUE_PARAMETER name:<this> type:<root>.A
FUN FAKE_OVERRIDE name:<set-b> visibility:public modality:FINAL <> ($this:<root>.A, <set-?>:kotlin.Number) returnType:kotlin.Unit [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:b visibility:public modality:FINAL [lateinit,fake_override,var]
overridden:
public final fun <set-b> (<set-?>: kotlin.Number): kotlin.Unit declared in <root>.A
$this: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Number
CLASS CLASS name:D modality:ABSTRACT visibility:public superTypes:[<root>.A; <root>.Java3]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.D
CONSTRUCTOR visibility:public <> () returnType:<root>.D [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.A'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:D modality:ABSTRACT visibility:public superTypes:[<root>.A; <root>.Java3]'
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>.A
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Java3
$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>.A
public open fun hashCode (): kotlin.Int declared in <root>.Java3
$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>.A
public open fun toString (): kotlin.String declared in <root>.Java3
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY FAKE_OVERRIDE name:a visibility:public modality:ABSTRACT [fake_override,var]
overridden:
public abstract a: kotlin.Int
FUN FAKE_OVERRIDE name:<get-a> visibility:public modality:ABSTRACT <> ($this:<root>.KotlinInterface) returnType:kotlin.Int [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:a visibility:public modality:ABSTRACT [fake_override,var]
overridden:
public abstract fun <get-a> (): kotlin.Int declared in <root>.Java3
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
FUN FAKE_OVERRIDE name:<set-a> visibility:public modality:ABSTRACT <> ($this:<root>.KotlinInterface, <set-?>:kotlin.Int) returnType:kotlin.Unit [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:a visibility:public modality:ABSTRACT [fake_override,var]
overridden:
public abstract fun <set-a> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Java3
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
PROPERTY FAKE_OVERRIDE name:b visibility:public modality:FINAL [lateinit,fake_override,var]
overridden:
public final b: kotlin.Number
public abstract b: kotlin.Number
FUN FAKE_OVERRIDE name:<get-b> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Number [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:b visibility:public modality:FINAL [lateinit,fake_override,var]
overridden:
public final fun <get-b> (): kotlin.Number declared in <root>.A
public abstract fun <get-b> (): kotlin.Number declared in <root>.Java3
$this: VALUE_PARAMETER name:<this> type:<root>.A
FUN FAKE_OVERRIDE name:<set-b> visibility:public modality:FINAL <> ($this:<root>.A, <set-?>:kotlin.Number) returnType:kotlin.Unit [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:b visibility:public modality:FINAL [lateinit,fake_override,var]
overridden:
public final fun <set-b> (<set-?>: kotlin.Number): kotlin.Unit declared in <root>.A
public abstract fun <set-b> (<set-?>: kotlin.Number): kotlin.Unit declared in <root>.Java3
$this: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Number
CLASS INTERFACE name:KotlinInterface modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.KotlinInterface
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY name:a visibility:public modality:ABSTRACT [var]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:ABSTRACT <> ($this:<root>.KotlinInterface) returnType:kotlin.Int
correspondingProperty: PROPERTY name:a visibility:public modality:ABSTRACT [var]
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-a> visibility:public modality:ABSTRACT <> ($this:<root>.KotlinInterface, <set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:a visibility:public modality:ABSTRACT [var]
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
PROPERTY name:b visibility:public modality:ABSTRACT [var]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-b> visibility:public modality:ABSTRACT <> ($this:<root>.KotlinInterface) returnType:kotlin.Number
correspondingProperty: PROPERTY name:b visibility:public modality:ABSTRACT [var]
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-b> visibility:public modality:ABSTRACT <> ($this:<root>.KotlinInterface, <set-?>:kotlin.Number) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:b visibility:public modality:ABSTRACT [var]
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Number
FUN name:test visibility:public modality:FINAL <> (b:<root>.B, c:<root>.C, d:<root>.D) returnType:kotlin.Unit
VALUE_PARAMETER name:b index:0 type:<root>.B
VALUE_PARAMETER name:c index:1 type:<root>.C
VALUE_PARAMETER name:d index:2 type:<root>.D
BLOCK_BODY
CALL 'public final fun <set-b> (<set-?>: kotlin.Number): 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=3
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-b> (): kotlin.Number declared in <root>.B' type=kotlin.Number origin=GET_PROPERTY
$this: GET_VAR 'b: <root>.B declared in <root>.test' type=<root>.B origin=null
CALL 'public final fun <set-b> (<set-?>: kotlin.Number): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=EQ
$this: GET_VAR 'c: <root>.C declared in <root>.test' type=<root>.C origin=null
<set-?>: CONST Int type=kotlin.Int value=4
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-b> (): kotlin.Number declared in <root>.C' type=kotlin.Number origin=GET_PROPERTY
$this: GET_VAR 'c: <root>.C declared in <root>.test' type=<root>.C origin=null
CALL 'public abstract fun <set-a> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.D' type=kotlin.Unit origin=EQ
$this: GET_VAR 'd: <root>.D declared in <root>.test' type=<root>.D origin=null
<set-?>: CONST Int type=kotlin.Int value=2
CALL 'public final fun <set-b> (<set-?>: kotlin.Number): kotlin.Unit declared in <root>.D' type=kotlin.Unit origin=EQ
$this: GET_VAR 'd: <root>.D declared in <root>.test' type=<root>.D origin=null
<set-?>: CONST Int type=kotlin.Int value=7
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public abstract fun <get-a> (): kotlin.Int declared in <root>.D' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'd: <root>.D declared in <root>.test' type=<root>.D origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-b> (): kotlin.Number declared in <root>.D' type=kotlin.Number origin=GET_PROPERTY
$this: GET_VAR 'd: <root>.D declared in <root>.test' type=<root>.D origin=null