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

152 lines
11 KiB
Plaintext
Vendored

FILE fqName:<root> fileName:/test.kt
CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[<root>.Java1; <root>.KotlinInterface]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
CONSTRUCTOR visibility:public <> () returnType:<root>.A [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java1'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[<root>.Java1; <root>.KotlinInterface]'
FUN FAKE_OVERRIDE name:bar visibility:public modality:ABSTRACT <> ($this:<root>.KotlinInterface) returnType:kotlin.Int [fake_override]
overridden:
public abstract fun bar (): kotlin.Int declared in <root>.KotlinInterface
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN <> () returnType:@[FlexibleNullability] kotlin.Any? [fake_override]
overridden:
public open fun bar (): @[FlexibleNullability] kotlin.Any? declared in <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
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.KotlinInterface
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:foo visibility:public modality:ABSTRACT <> ($this:<root>.KotlinInterface, t:kotlin.Int) returnType:kotlin.Unit [fake_override]
overridden:
public abstract fun foo (t: kotlin.Int): kotlin.Unit declared in <root>.KotlinInterface
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
VALUE_PARAMETER name:t index:0 type:kotlin.Int
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> (t:@[FlexibleNullability] kotlin.Any?) returnType:kotlin.Unit [fake_override]
overridden:
public open fun foo (t: @[FlexibleNullability] kotlin.Any?): kotlin.Unit declared in <root>.Java1
VALUE_PARAMETER name:t index:0 type:@[FlexibleNullability] 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
public open fun hashCode (): kotlin.Int declared in <root>.KotlinInterface
$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
public open fun toString (): kotlin.String declared in <root>.KotlinInterface
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY FAKE_OVERRIDE name:a visibility:public modality:ABSTRACT [fake_override,val]
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,val]
overridden:
public abstract fun <get-a> (): kotlin.Int declared in <root>.KotlinInterface
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
CLASS CLASS name:B modality:FINAL visibility:public superTypes:[<root>.Java1; <root>.KotlinInterface]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B
PROPERTY name:a visibility:public modality:OPEN [val]
overridden:
public abstract a: kotlin.Int
FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
GET_VAR 'a: kotlin.Int declared in <root>.B.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:OPEN <> ($this:<root>.B) returnType:kotlin.Int
correspondingProperty: PROPERTY name:a visibility:public modality:OPEN [val]
overridden:
public abstract fun <get-a> (): kotlin.Int declared in <root>.KotlinInterface
$this: VALUE_PARAMETER name:<this> type:<root>.B
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-a> (): kotlin.Int declared in <root>.B'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.B declared in <root>.B.<get-a>' type=<root>.B origin=null
CONSTRUCTOR visibility:public <> (a:kotlin.Int) returnType:<root>.B [primary]
VALUE_PARAMETER name:a index:0 type:kotlin.Int
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; <root>.KotlinInterface]'
FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN <> () returnType:@[FlexibleNullability] kotlin.Any? [fake_override]
overridden:
public open fun bar (): @[FlexibleNullability] kotlin.Any? declared in <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
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.KotlinInterface
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> (t:@[FlexibleNullability] kotlin.Any?) returnType:kotlin.Unit [fake_override]
overridden:
public open fun foo (t: @[FlexibleNullability] kotlin.Any?): kotlin.Unit declared in <root>.Java1
VALUE_PARAMETER name:t index:0 type:@[FlexibleNullability] 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
public open fun hashCode (): kotlin.Int declared in <root>.KotlinInterface
$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
public open fun toString (): kotlin.String declared in <root>.KotlinInterface
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:bar visibility:public modality:OPEN <> ($this:<root>.B) returnType:kotlin.Int
overridden:
public abstract fun bar (): kotlin.Int declared in <root>.KotlinInterface
$this: VALUE_PARAMETER name:<this> type:<root>.B
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun bar (): kotlin.Int declared in <root>.B'
CONST Int type=kotlin.Int value=1
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.B, t:kotlin.Int) returnType:kotlin.Unit
overridden:
public abstract fun foo (t: kotlin.Int): kotlin.Unit declared in <root>.KotlinInterface
$this: VALUE_PARAMETER name:<this> type:<root>.B
VALUE_PARAMETER name:t index:0 type:kotlin.Int
BLOCK_BODY
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
FUN name:bar visibility:public modality:ABSTRACT <> ($this:<root>.KotlinInterface) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
FUN name:foo visibility:public modality:ABSTRACT <> ($this:<root>.KotlinInterface, t:kotlin.Int) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
VALUE_PARAMETER name:t index:0 type:kotlin.Int
PROPERTY name:a visibility:public modality:ABSTRACT [val]
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 [val]
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
FUN name:test visibility:public modality:FINAL <> (a:<root>.A, b:<root>.B) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:<root>.A
VALUE_PARAMETER name:b index:1 type:<root>.B
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public abstract fun <get-a> (): kotlin.Int declared in <root>.A' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'a: <root>.A declared in <root>.test' type=<root>.A origin=null
CALL 'public abstract fun foo (t: kotlin.Int): kotlin.Unit declared in <root>.A' type=kotlin.Unit origin=null
$this: GET_VAR 'a: <root>.A declared in <root>.test' type=<root>.A origin=null
t: CONST Int type=kotlin.Int value=1
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public abstract fun bar (): kotlin.Int declared in <root>.A' type=kotlin.Int origin=null
$this: GET_VAR 'a: <root>.A declared in <root>.test' type=<root>.A origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun <get-a> (): kotlin.Int declared in <root>.B' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'b: <root>.B declared in <root>.test' type=<root>.B origin=null
CALL 'public open fun foo (t: kotlin.Int): kotlin.Unit declared in <root>.B' type=kotlin.Unit origin=null
$this: GET_VAR 'b: <root>.B declared in <root>.test' type=<root>.B origin=null
t: CONST Int type=kotlin.Int value=1
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun bar (): kotlin.Int declared in <root>.B' type=kotlin.Int origin=null
$this: GET_VAR 'b: <root>.B declared in <root>.test' type=<root>.B origin=null