[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>
This commit is contained in:
anzhela.sukhanova
2024-01-19 18:22:17 +02:00
committed by Space Team
parent 30aae741a6
commit 82255d5ee8
853 changed files with 269404 additions and 0 deletions
@@ -0,0 +1,262 @@
FILE fqName:<root> fileName:/1.kt
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<root>.Java1]
$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: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:foo visibility:public modality:OPEN <> ($this:<root>.Java1) returnType:kotlin.Unit [fake_override]
overridden:
public open fun foo (): kotlin.Unit declared in <root>.Java1
$this: VALUE_PARAMETER name:<this> type:<root>.Java1
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
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
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.B) returnType:kotlin.Unit
overridden:
public open fun foo (): kotlin.Unit declared in <root>.Java1
$this: VALUE_PARAMETER name:<this> type:<root>.B
BLOCK_BODY
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<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>.Java2'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<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>.Java2
$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 <> ($this:<root>.Java1) returnType:kotlin.Unit [fake_override]
overridden:
public open fun foo (): kotlin.Unit declared in <root>.Java2
$this: VALUE_PARAMETER name:<this> type:<root>.Java1
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>.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>.Java2
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:D modality:FINAL visibility:public superTypes:[<root>.Java2]
$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>.Java2'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:D modality:FINAL visibility:public superTypes:[<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>.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>.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>.Java2
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.D) returnType:kotlin.Unit
overridden:
public open fun foo (): kotlin.Unit declared in <root>.Java2
$this: VALUE_PARAMETER name:<this> type:<root>.D
BLOCK_BODY
CLASS CLASS name:E modality:FINAL visibility:public superTypes:[<root>.Java3]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.E
CONSTRUCTOR visibility:public <> () returnType:<root>.E [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java3'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:E modality:FINAL visibility:public superTypes:[<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>.Java3
$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 <> ($this:<root>.Java1) returnType:kotlin.Unit [fake_override]
overridden:
public open fun foo (): kotlin.Unit declared in <root>.Java3
$this: VALUE_PARAMETER name:<this> type:<root>.Java1
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>.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>.Java3
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:F modality:FINAL visibility:public superTypes:[<root>.Java3]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.F
CONSTRUCTOR visibility:public <> () returnType:<root>.F [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java3'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:F modality:FINAL visibility:public superTypes:[<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>.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>.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>.Java3
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.F) returnType:kotlin.Unit
overridden:
public open fun foo (): kotlin.Unit declared in <root>.Java3
$this: VALUE_PARAMETER name:<this> type:<root>.F
BLOCK_BODY
CLASS CLASS name:G modality:FINAL visibility:public superTypes:[<root>.Java4]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.G
CONSTRUCTOR visibility:public <> () returnType:<root>.G [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java4'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:G modality:FINAL visibility:public superTypes:[<root>.Java4]'
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>.Java4
$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 <> ($this:<root>.Java4) returnType:kotlin.Unit [fake_override]
overridden:
public open fun foo (): kotlin.Unit declared in <root>.Java4
$this: VALUE_PARAMETER name:<this> type:<root>.Java4
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>.Java4
$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>.Java4
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:H modality:FINAL visibility:public superTypes:[<root>.Java4]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.H
CONSTRUCTOR visibility:public <> () returnType:<root>.H [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java4'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:H modality:FINAL visibility:public superTypes:[<root>.Java4]'
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>.Java4
$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>.Java4
$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>.Java4
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.H) returnType:kotlin.Unit
overridden:
public open fun foo (): kotlin.Unit declared in <root>.Java4
$this: VALUE_PARAMETER name:<this> type:<root>.H
BLOCK_BODY
CLASS CLASS name:KotlinClass modality:OPEN visibility:public superTypes:[<root>.Java1]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.KotlinClass
CONSTRUCTOR visibility:public <> () returnType:<root>.KotlinClass [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java1'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:KotlinClass modality:OPEN 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:foo visibility:public modality:OPEN <> ($this:<root>.Java1) returnType:kotlin.Unit [fake_override]
overridden:
public open fun foo (): kotlin.Unit declared in <root>.Java1
$this: VALUE_PARAMETER name:<this> type:<root>.Java1
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
FUN name:test visibility:public modality:FINAL <> (a:<root>.A, b:<root>.B, c:<root>.C, d:<root>.D, e:<root>.E, f:<root>.F, g:<root>.G, h:<root>.H) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:<root>.A
VALUE_PARAMETER name:b index:1 type:<root>.B
VALUE_PARAMETER name:c index:2 type:<root>.C
VALUE_PARAMETER name:d index:3 type:<root>.D
VALUE_PARAMETER name:e index:4 type:<root>.E
VALUE_PARAMETER name:f index:5 type:<root>.F
VALUE_PARAMETER name:g index:6 type:<root>.G
VALUE_PARAMETER name:h index:7 type:<root>.H
BLOCK_BODY
CALL 'public open fun foo (): 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
CALL 'public open fun bar (): kotlin.Unit declared in <root>.Java1.Inner' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java1.Inner' type=<root>.Java1.Inner origin=null
$outer: GET_VAR 'a: <root>.A declared in <root>.test' type=<root>.A origin=null
CALL 'public open fun foo (): 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
CALL 'public open fun bar (): kotlin.Unit declared in <root>.Java1.Inner' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java1.Inner' type=<root>.Java1.Inner origin=null
$outer: GET_VAR 'b: <root>.B declared in <root>.test' type=<root>.B origin=null
CALL 'public open fun foo (): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=null
$this: GET_VAR 'c: <root>.C declared in <root>.test' type=<root>.C origin=null
CALL 'public open fun bar (): kotlin.Unit declared in <root>.Java1.Inner' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java1.Inner' type=<root>.Java1.Inner origin=null
$outer: GET_VAR 'c: <root>.C declared in <root>.test' type=<root>.C origin=null
CALL 'public open fun foo (): kotlin.Unit declared in <root>.D' type=kotlin.Unit origin=null
$this: GET_VAR 'd: <root>.D declared in <root>.test' type=<root>.D origin=null
CALL 'public open fun bar (): kotlin.Unit declared in <root>.Java1.Inner' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java1.Inner' type=<root>.Java1.Inner origin=null
$outer: GET_VAR 'd: <root>.D declared in <root>.test' type=<root>.D origin=null
CALL 'public open fun foo (): kotlin.Unit declared in <root>.E' type=kotlin.Unit origin=null
$this: GET_VAR 'e: <root>.E declared in <root>.test' type=<root>.E origin=null
CALL 'public open fun bar (): kotlin.Unit declared in <root>.Java1.Inner' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java1.Inner' type=<root>.Java1.Inner origin=null
$outer: GET_VAR 'e: <root>.E declared in <root>.test' type=<root>.E origin=null
CALL 'public open fun foo (): kotlin.Unit declared in <root>.F' type=kotlin.Unit origin=null
$this: GET_VAR 'f: <root>.F declared in <root>.test' type=<root>.F origin=null
CALL 'public open fun bar (): kotlin.Unit declared in <root>.Java1.Inner' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java1.Inner' type=<root>.Java1.Inner origin=null
$outer: GET_VAR 'f: <root>.F declared in <root>.test' type=<root>.F origin=null
CALL 'public open fun foo (): kotlin.Unit declared in <root>.G' type=kotlin.Unit origin=null
$this: GET_VAR 'g: <root>.G declared in <root>.test' type=<root>.G origin=null
CALL 'public open fun bar (): kotlin.Unit declared in <root>.Java4.Inner' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java4.Inner' type=<root>.Java4.Inner origin=null
$outer: GET_VAR 'g: <root>.G declared in <root>.test' type=<root>.G origin=null
CALL 'public open fun foo (): kotlin.Unit declared in <root>.H' type=kotlin.Unit origin=null
$this: GET_VAR 'h: <root>.H declared in <root>.test' type=<root>.H origin=null
CALL 'public open fun bar (): kotlin.Unit declared in <root>.Java4.Inner' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java4.Inner' type=<root>.Java4.Inner origin=null
$outer: GET_VAR 'h: <root>.H declared in <root>.test' type=<root>.H origin=null