[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,473 @@
FILE fqName:<root> fileName:/1.kt
CLASS CLASS name:A modality:FINAL visibility:public [data] superTypes:[<root>.Java1]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
PROPERTY name:a visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
GET_VAR 'a: kotlin.Int declared in <root>.A.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Int
correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-a> (): kotlin.Int declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-a>' type=<root>.A origin=null
CONSTRUCTOR visibility:public <> (a:kotlin.Int) returnType:<root>.A [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:A modality:FINAL visibility:public [data] superTypes:[<root>.Java1]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Int [operator]
overridden:
public open fun component1 (): @[FlexibleNullability] kotlin.Any? declared in <root>.Java1
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.component1' type=<root>.A origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.A, a:kotlin.Int) returnType:<root>.A
$this: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:a index:0 type:kotlin.Int
EXPRESSION_BODY
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.copy' type=<root>.A origin=null
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun copy (a: kotlin.Int): <root>.A declared in <root>.A'
CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.A' type=<root>.A origin=null
a: GET_VAR 'a: kotlin.Int declared in <root>.A.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.A, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Java1
$this: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
BLOCK_BODY
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
arg0: GET_VAR '<this>: <root>.A declared in <root>.A.equals' type=<root>.A origin=null
arg1: GET_VAR 'other: kotlin.Any? declared in <root>.A.equals' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.A'
CONST Boolean type=kotlin.Boolean value=true
WHEN type=kotlin.Unit origin=null
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.A
GET_VAR 'other: kotlin.Any? declared in <root>.A.equals' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.A'
CONST Boolean type=kotlin.Boolean value=false
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.A [val]
TYPE_OP type=<root>.A origin=CAST typeOperand=<root>.A
GET_VAR 'other: kotlin.Any? declared in <root>.A.equals' type=kotlin.Any? origin=null
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.equals' type=<root>.A origin=null
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR 'val tmp_0: <root>.A declared in <root>.A.equals' type=<root>.A origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.A'
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.A'
CONST Boolean type=kotlin.Boolean value=true
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.A) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.Java1
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.A'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.hashCode' type=<root>.A origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.A) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in <root>.Java1
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.A'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="A("
CONST String type=kotlin.String value="a="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.toString' type=<root>.A origin=null
CONST String type=kotlin.String value=")"
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.A, i:kotlin.Int?) returnType:kotlin.Unit
overridden:
public open fun foo (i: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in <root>.Java1
$this: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:i index:0 type:kotlin.Int?
BLOCK_BODY
CLASS CLASS name:B modality:FINAL visibility:public [data] superTypes:[<root>.Java1; <root>.Java2]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B
PROPERTY name:a visibility:public modality:FINAL [val]
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:FINAL <> ($this:<root>.B) returnType:kotlin.Int
correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.B
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final 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 [data] superTypes:[<root>.Java1; <root>.Java2]'
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:<root>.Java1, i:@[FlexibleNullability] kotlin.Int?) returnType:kotlin.Unit [fake_override]
overridden:
public open fun foo (i: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in <root>.Java1
$this: VALUE_PARAMETER name:<this> type:<root>.Java1
VALUE_PARAMETER name:i index:0 type:@[FlexibleNullability] kotlin.Int?
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.B) returnType:kotlin.Int [operator]
overridden:
public open fun component1 (): @[FlexibleNullability] kotlin.Any? declared in <root>.Java1
public abstract fun component1 (): @[FlexibleNullability] kotlin.Int? declared in <root>.Java2
$this: VALUE_PARAMETER name:<this> type:<root>.B
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): 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.component1' type=<root>.B origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.B, a:kotlin.Int) returnType:<root>.B
$this: VALUE_PARAMETER name:<this> type:<root>.B
VALUE_PARAMETER name:a index:0 type:kotlin.Int
EXPRESSION_BODY
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.copy' type=<root>.B origin=null
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun copy (a: kotlin.Int): <root>.B declared in <root>.B'
CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.B' type=<root>.B origin=null
a: GET_VAR 'a: kotlin.Int declared in <root>.B.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.B, other:kotlin.Any?) returnType:kotlin.Boolean [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>.Java2
$this: VALUE_PARAMETER name:<this> type:<root>.B
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
BLOCK_BODY
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
arg0: GET_VAR '<this>: <root>.B declared in <root>.B.equals' type=<root>.B origin=null
arg1: GET_VAR 'other: kotlin.Any? declared in <root>.B.equals' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.B'
CONST Boolean type=kotlin.Boolean value=true
WHEN type=kotlin.Unit origin=null
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.B
GET_VAR 'other: kotlin.Any? declared in <root>.B.equals' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.B'
CONST Boolean type=kotlin.Boolean value=false
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.B [val]
TYPE_OP type=<root>.B origin=CAST typeOperand=<root>.B
GET_VAR 'other: kotlin.Any? declared in <root>.B.equals' type=kotlin.Any? origin=null
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
arg0: 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.equals' type=<root>.B origin=null
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR 'val tmp_1: <root>.B declared in <root>.B.equals' type=<root>.B origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.B'
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.B'
CONST Boolean type=kotlin.Boolean value=true
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.B) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.Java1
public open fun hashCode (): kotlin.Int declared in <root>.Java2
$this: VALUE_PARAMETER name:<this> type:<root>.B
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.B'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: 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.hashCode' type=<root>.B origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.B) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in <root>.Java1
public open fun toString (): kotlin.String declared in <root>.Java2
$this: VALUE_PARAMETER name:<this> type:<root>.B
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.B'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="B("
CONST String type=kotlin.String value="a="
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.toString' type=<root>.B origin=null
CONST String type=kotlin.String value=")"
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.B, i:kotlin.Any?) returnType:kotlin.Unit
overridden:
public abstract fun foo (i: @[FlexibleNullability] kotlin.Any?): kotlin.Unit declared in <root>.Java2
$this: VALUE_PARAMETER name:<this> type:<root>.B
VALUE_PARAMETER name:i index:0 type:kotlin.Any?
BLOCK_BODY
CLASS CLASS name:C modality:FINAL visibility:public [data] superTypes:[<root>.Java1; <root>.KotlinInterface]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
PROPERTY name:a visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
GET_VAR 'a: kotlin.Int declared in <root>.C.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Int
correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-a> (): kotlin.Int declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-a>' type=<root>.C origin=null
CONSTRUCTOR visibility:public <> (a:kotlin.Int) returnType:<root>.C [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:C modality:FINAL visibility:public [data] superTypes:[<root>.Java1; <root>.KotlinInterface]'
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:<root>.Java1, i:@[FlexibleNullability] kotlin.Int?) returnType:kotlin.Unit [fake_override]
overridden:
public open fun foo (i: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in <root>.Java1
$this: VALUE_PARAMETER name:<this> type:<root>.Java1
VALUE_PARAMETER name:i index:0 type:@[FlexibleNullability] kotlin.Int?
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Int [operator]
overridden:
public open fun component1 (): @[FlexibleNullability] kotlin.Any? declared in <root>.Java1
public abstract fun component1 (): kotlin.Int declared in <root>.KotlinInterface
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.component1' type=<root>.C origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.C, a:kotlin.Int) returnType:<root>.C
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:a index:0 type:kotlin.Int
EXPRESSION_BODY
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.copy' type=<root>.C origin=null
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun copy (a: kotlin.Int): <root>.C declared in <root>.C'
CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.C' type=<root>.C origin=null
a: GET_VAR 'a: kotlin.Int declared in <root>.C.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.C, other:kotlin.Any?) returnType:kotlin.Boolean [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:<root>.C
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
BLOCK_BODY
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
arg0: GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
arg1: GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.C'
CONST Boolean type=kotlin.Boolean value=true
WHEN type=kotlin.Unit origin=null
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.C
GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.C'
CONST Boolean type=kotlin.Boolean value=false
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:<root>.C [val]
TYPE_OP type=<root>.C origin=CAST typeOperand=<root>.C
GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR 'val tmp_2: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.C'
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.C'
CONST Boolean type=kotlin.Boolean value=true
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.Int
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:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.C'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.hashCode' type=<root>.C origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.String
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:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.C'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="C("
CONST String type=kotlin.String value="a="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.toString' type=<root>.C origin=null
CONST String type=kotlin.String value=")"
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.C, i:kotlin.Any) returnType:kotlin.Unit
overridden:
public abstract fun foo (i: kotlin.Any): kotlin.Unit declared in <root>.KotlinInterface
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:i index:0 type:kotlin.Any
BLOCK_BODY
CLASS CLASS name:D modality:FINAL visibility:public [data] superTypes:[<root>.Java3]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.D
PROPERTY name:a visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
GET_VAR 'a: kotlin.Int declared in <root>.D.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:FINAL <> ($this:<root>.D) returnType:kotlin.Int
correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.D
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-a> (): kotlin.Int declared in <root>.D'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.D declared in <root>.D.<get-a>' type=<root>.D origin=null
CONSTRUCTOR visibility:public <> (a:kotlin.Int) returnType:<root>.D [primary]
VALUE_PARAMETER name:a index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:D modality:FINAL visibility:public [data] superTypes:[<root>.Java3]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.D) returnType:kotlin.Int [operator]
overridden:
public abstract fun component1 (): kotlin.Int declared in <root>.Java3
$this: VALUE_PARAMETER name:<this> type:<root>.D
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int declared in <root>.D'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.D declared in <root>.D.component1' type=<root>.D origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.D, a:kotlin.Int) returnType:<root>.D
$this: VALUE_PARAMETER name:<this> type:<root>.D
VALUE_PARAMETER name:a index:0 type:kotlin.Int
EXPRESSION_BODY
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.D declared in <root>.D.copy' type=<root>.D origin=null
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun copy (a: kotlin.Int): <root>.D declared in <root>.D'
CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.D' type=<root>.D origin=null
a: GET_VAR 'a: kotlin.Int declared in <root>.D.copy' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.D, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Java3
$this: VALUE_PARAMETER name:<this> type:<root>.D
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
BLOCK_BODY
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
arg0: GET_VAR '<this>: <root>.D declared in <root>.D.equals' type=<root>.D origin=null
arg1: GET_VAR 'other: kotlin.Any? declared in <root>.D.equals' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.D'
CONST Boolean type=kotlin.Boolean value=true
WHEN type=kotlin.Unit origin=null
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.D
GET_VAR 'other: kotlin.Any? declared in <root>.D.equals' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.D'
CONST Boolean type=kotlin.Boolean value=false
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:<root>.D [val]
TYPE_OP type=<root>.D origin=CAST typeOperand=<root>.D
GET_VAR 'other: kotlin.Any? declared in <root>.D.equals' type=kotlin.Any? origin=null
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.D declared in <root>.D.equals' type=<root>.D origin=null
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR 'val tmp_3: <root>.D declared in <root>.D.equals' type=<root>.D origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.D'
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.D'
CONST Boolean type=kotlin.Boolean value=true
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.D) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.Java3
$this: VALUE_PARAMETER name:<this> type:<root>.D
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.D'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.D declared in <root>.D.hashCode' type=<root>.D origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.D) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in <root>.Java3
$this: VALUE_PARAMETER name:<this> type:<root>.D
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.D'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="D("
CONST String type=kotlin.String value="a="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.D declared in <root>.D.toString' type=<root>.D origin=null
CONST String type=kotlin.String value=")"
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.D, i:kotlin.Any) returnType:kotlin.Unit
overridden:
public abstract fun foo (i: kotlin.Any): kotlin.Unit declared in <root>.Java3
$this: VALUE_PARAMETER name:<this> type:<root>.D
VALUE_PARAMETER name:i index:0 type:kotlin.Any
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:component1 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, i:kotlin.Any) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface
VALUE_PARAMETER name:i index:0 type:kotlin.Any
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:k type:kotlin.Int [val]
CALL 'public final fun component1 (): kotlin.Int declared in <root>.A' type=kotlin.Int origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.A' type=<root>.A origin=null
a: CONST Int type=kotlin.Int value=1
CALL 'public open fun foo (i: kotlin.Int?): kotlin.Unit declared in <root>.A' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.A' type=<root>.A origin=null
a: CONST Int type=kotlin.Int value=1
i: CONST Int type=kotlin.Int value=1
CALL 'public open fun foo (i: kotlin.Int?): kotlin.Unit declared in <root>.A' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.A' type=<root>.A origin=null
a: CONST Int type=kotlin.Int value=1
i: CONST Null type=kotlin.Nothing? value=null
VAR name:k2 type:kotlin.Int [val]
CALL 'public final fun component1 (): kotlin.Int declared in <root>.B' type=kotlin.Int origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.B' type=<root>.B origin=null
a: CONST Int type=kotlin.Int value=1
CALL 'public open fun foo (i: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in <root>.B' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.B' type=<root>.B origin=null
a: CONST Int type=kotlin.Int value=1
i: CONST Int type=kotlin.Int value=1
CALL 'public open fun foo (i: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in <root>.B' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.B' type=<root>.B origin=null
a: CONST Int type=kotlin.Int value=1
i: CONST Null type=kotlin.Nothing? value=null
VAR name:k3 type:kotlin.Int [val]
CALL 'public final fun component1 (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.C' type=<root>.C origin=null
a: CONST Int type=kotlin.Int value=1
CALL 'public open fun foo (i: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.C' type=<root>.C origin=null
a: CONST Int type=kotlin.Int value=1
i: CONST Int type=kotlin.Int value=1
CALL 'public open fun foo (i: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.C' type=<root>.C origin=null
a: CONST Int type=kotlin.Int value=1
i: CONST Null type=kotlin.Nothing? value=null
VAR name:k4 type:kotlin.Int [val]
CALL 'public final fun component1 (): kotlin.Int declared in <root>.D' type=kotlin.Int origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.D' type=<root>.D origin=null
a: CONST Int type=kotlin.Int value=1
CALL 'public open fun foo (i: kotlin.Any): kotlin.Unit declared in <root>.D' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.Int) declared in <root>.D' type=<root>.D origin=null
a: CONST Int type=kotlin.Int value=1
i: CONST Int type=kotlin.Int value=1
@@ -0,0 +1,61 @@
// FIR_IDENTICAL
// TARGET_BACKEND: JVM
// FULL_JDK
// FILE: Java1.java
public class Java1 {
public Object component1(){
return "java1";
};
public void foo(Integer i){};
}
// FILE: Java2.java
public interface Java2 {
public Integer component1();
public void foo(Object i);
}
// FILE: Java3.java
public interface Java3 extends KotlinInterface { }
// FILE: 1.kt
data class A (val a : Int): Java1() { //Kotlin ← Java
override fun foo(i: Int?) { }
}
data class B(val a : Int) : Java1(), Java2 { //Kotlin ← Java1, Java2
override fun foo(i: Any?) { }
}
data class C(val a: Int): Java1(), KotlinInterface { //Kotlin ← Java, Kotlin2
override fun foo(i: Any) { }
}
data class D(val a: Int): Java3 { //Kotlin ← Java ← Kotlin
override fun foo(i: Any) { }
}
interface KotlinInterface {
fun component1(): Int
fun foo(i: Any)
}
fun test() {
val k: Int = A(1).component1()
A(1).foo(1)
A(1).foo(null)
val k2: Int = B(1).component1()
B(1).foo(1)
B(1).foo(null)
val k3: Int = C(1).component1()
C(1).foo(1)
C(1).foo(null)
val k4: Int = D(1).component1()
D(1).foo(1)
}
@@ -0,0 +1,204 @@
data class A : Java1 {
val a: Int
field = a
get
constructor(a: Int) /* primary */ {
super/*Java1*/()
/* <init>() */
}
override operator fun component1(): Int {
return <this>.#a
}
fun copy(a: Int = <this>.#a): A {
return A(a = a)
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
}
when {
other !is A -> return false
}
val tmp_0: A = other as A
when {
EQEQ(arg0 = <this>.#a, arg1 = tmp_0.#a).not() -> return false
}
return true
}
override fun hashCode(): Int {
return <this>.#a.hashCode()
}
override fun toString(): String {
return "A(" + "a=" + <this>.#a + ")"
}
override fun foo(i: Int?) {
}
}
data class B : Java1, Java2 {
val a: Int
field = a
get
constructor(a: Int) /* primary */ {
super/*Java1*/()
/* <init>() */
}
override operator fun component1(): Int {
return <this>.#a
}
fun copy(a: Int = <this>.#a): B {
return B(a = a)
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
}
when {
other !is B -> return false
}
val tmp_1: B = other as B
when {
EQEQ(arg0 = <this>.#a, arg1 = tmp_1.#a).not() -> return false
}
return true
}
override fun hashCode(): Int {
return <this>.#a.hashCode()
}
override fun toString(): String {
return "B(" + "a=" + <this>.#a + ")"
}
override fun foo(i: Any?) {
}
}
data class C : Java1, KotlinInterface {
val a: Int
field = a
get
constructor(a: Int) /* primary */ {
super/*Java1*/()
/* <init>() */
}
override operator fun component1(): Int {
return <this>.#a
}
fun copy(a: Int = <this>.#a): C {
return C(a = a)
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
}
when {
other !is C -> return false
}
val tmp_2: C = other as C
when {
EQEQ(arg0 = <this>.#a, arg1 = tmp_2.#a).not() -> return false
}
return true
}
override fun hashCode(): Int {
return <this>.#a.hashCode()
}
override fun toString(): String {
return "C(" + "a=" + <this>.#a + ")"
}
override fun foo(i: Any) {
}
}
data class D : Java3 {
val a: Int
field = a
get
constructor(a: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
override operator fun component1(): Int {
return <this>.#a
}
fun copy(a: Int = <this>.#a): D {
return D(a = a)
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
}
when {
other !is D -> return false
}
val tmp_3: D = other as D
when {
EQEQ(arg0 = <this>.#a, arg1 = tmp_3.#a).not() -> return false
}
return true
}
override fun hashCode(): Int {
return <this>.#a.hashCode()
}
override fun toString(): String {
return "D(" + "a=" + <this>.#a + ")"
}
override fun foo(i: Any) {
}
}
interface KotlinInterface {
abstract fun component1(): Int
abstract fun foo(i: Any)
}
fun test() {
val k: Int = A(a = 1).component1()
A(a = 1).foo(i = 1)
A(a = 1).foo(i = null)
val k2: Int = B(a = 1).component1()
B(a = 1).foo(i = 1)
B(a = 1).foo(i = null)
val k3: Int = C(a = 1).component1()
C(a = 1).foo(i = 1)
C(a = 1).foo(i = null)
val k4: Int = D(a = 1).component1()
D(a = 1).foo(i = 1)
}
@@ -0,0 +1,271 @@
// CHECK:
// Mangled name: A
// Public signature: /A|null[0]
data class A : Java1 {
// CHECK:
// Mangled name: A{}a
// Public signature: /A.a|-1200697420457237799[0]
// Public signature debug description: {}a
val a: Int
// CHECK JVM_IR:
// Mangled name: A#<get-a>(){}kotlin.Int
// Public signature: /A.a.<get-a>|4232747788241509192[0]
// Public signature debug description: <get-a>(){}kotlin.Int
get
// CHECK:
// Mangled name: A#<init>(kotlin.Int){}
// Public signature: /A.<init>|-5182794243525578284[0]
// Public signature debug description: <init>(kotlin.Int){}
constructor(a: Int) /* primary */
// CHECK JVM_IR:
// Mangled name: A#component1(){}kotlin.Int
// Public signature: /A.component1|-8217597213800111288[0]
// Public signature debug description: component1(){}kotlin.Int
override operator fun component1(): Int
// CHECK JVM_IR:
// Mangled name: A#copy(kotlin.Int){}A
// Public signature: /A.copy|6666966860941076951[0]
// Public signature debug description: copy(kotlin.Int){}A
fun copy(a: Int): A
// CHECK JVM_IR:
// Mangled name: A#equals(kotlin.Any?){}kotlin.Boolean
// Public signature: /A.equals|722809408929142791[0]
// Public signature debug description: equals(kotlin.Any?){}kotlin.Boolean
override operator fun equals(other: Any?): Boolean
// CHECK JVM_IR:
// Mangled name: A#hashCode(){}kotlin.Int
// Public signature: /A.hashCode|-8048879360829830756[0]
// Public signature debug description: hashCode(){}kotlin.Int
override fun hashCode(): Int
// CHECK JVM_IR:
// Mangled name: A#toString(){}kotlin.String
// Public signature: /A.toString|6958853723545266802[0]
// Public signature debug description: toString(){}kotlin.String
override fun toString(): String
// CHECK:
// Mangled name: A#foo(kotlin.Int?){}
// Public signature: /A.foo|-4109638554625433529[0]
// Public signature debug description: foo(kotlin.Int?){}
override fun foo(i: Int?): Unit
}
// CHECK:
// Mangled name: B
// Public signature: /B|null[0]
data class B : Java1, Java2 {
// CHECK:
// Mangled name: B{}a
// Public signature: /B.a|-1200697420457237799[0]
// Public signature debug description: {}a
val a: Int
// CHECK JVM_IR:
// Mangled name: B#<get-a>(){}kotlin.Int
// Public signature: /B.a.<get-a>|4232747788241509192[0]
// Public signature debug description: <get-a>(){}kotlin.Int
get
// CHECK:
// Mangled name: B#<init>(kotlin.Int){}
// Public signature: /B.<init>|-5182794243525578284[0]
// Public signature debug description: <init>(kotlin.Int){}
constructor(a: Int) /* primary */
// CHECK:
// Mangled name: B#foo(kotlin.Int?){}
// Public signature: /B.foo|-4109638554625433529[0]
// Public signature debug description: foo(kotlin.Int?){}
/* fake */ override fun foo(i: Int?): Unit
// CHECK JVM_IR:
// Mangled name: B#component1(){}kotlin.Int
// Public signature: /B.component1|-8217597213800111288[0]
// Public signature debug description: component1(){}kotlin.Int
override operator fun component1(): Int
// CHECK JVM_IR:
// Mangled name: B#copy(kotlin.Int){}B
// Public signature: /B.copy|5674867048974181753[0]
// Public signature debug description: copy(kotlin.Int){}B
fun copy(a: Int): B
// CHECK JVM_IR:
// Mangled name: B#equals(kotlin.Any?){}kotlin.Boolean
// Public signature: /B.equals|722809408929142791[0]
// Public signature debug description: equals(kotlin.Any?){}kotlin.Boolean
override operator fun equals(other: Any?): Boolean
// CHECK JVM_IR:
// Mangled name: B#hashCode(){}kotlin.Int
// Public signature: /B.hashCode|-8048879360829830756[0]
// Public signature debug description: hashCode(){}kotlin.Int
override fun hashCode(): Int
// CHECK JVM_IR:
// Mangled name: B#toString(){}kotlin.String
// Public signature: /B.toString|6958853723545266802[0]
// Public signature debug description: toString(){}kotlin.String
override fun toString(): String
// CHECK:
// Mangled name: B#foo(kotlin.Any?){}
// Public signature: /B.foo|-6211124056249407422[0]
// Public signature debug description: foo(kotlin.Any?){}
override fun foo(i: Any?): Unit
}
// CHECK:
// Mangled name: C
// Public signature: /C|null[0]
data class C : Java1, KotlinInterface {
// CHECK:
// Mangled name: C{}a
// Public signature: /C.a|-1200697420457237799[0]
// Public signature debug description: {}a
val a: Int
// CHECK JVM_IR:
// Mangled name: C#<get-a>(){}kotlin.Int
// Public signature: /C.a.<get-a>|4232747788241509192[0]
// Public signature debug description: <get-a>(){}kotlin.Int
get
// CHECK:
// Mangled name: C#<init>(kotlin.Int){}
// Public signature: /C.<init>|-5182794243525578284[0]
// Public signature debug description: <init>(kotlin.Int){}
constructor(a: Int) /* primary */
// CHECK:
// Mangled name: C#foo(kotlin.Int?){}
// Public signature: /C.foo|-4109638554625433529[0]
// Public signature debug description: foo(kotlin.Int?){}
/* fake */ override fun foo(i: Int?): Unit
// CHECK JVM_IR:
// Mangled name: C#component1(){}kotlin.Int
// Public signature: /C.component1|-8217597213800111288[0]
// Public signature debug description: component1(){}kotlin.Int
override operator fun component1(): Int
// CHECK JVM_IR:
// Mangled name: C#copy(kotlin.Int){}C
// Public signature: /C.copy|-9014440408173608316[0]
// Public signature debug description: copy(kotlin.Int){}C
fun copy(a: Int): C
// CHECK JVM_IR:
// Mangled name: C#equals(kotlin.Any?){}kotlin.Boolean
// Public signature: /C.equals|722809408929142791[0]
// Public signature debug description: equals(kotlin.Any?){}kotlin.Boolean
override operator fun equals(other: Any?): Boolean
// CHECK JVM_IR:
// Mangled name: C#hashCode(){}kotlin.Int
// Public signature: /C.hashCode|-8048879360829830756[0]
// Public signature debug description: hashCode(){}kotlin.Int
override fun hashCode(): Int
// CHECK JVM_IR:
// Mangled name: C#toString(){}kotlin.String
// Public signature: /C.toString|6958853723545266802[0]
// Public signature debug description: toString(){}kotlin.String
override fun toString(): String
// CHECK:
// Mangled name: C#foo(kotlin.Any){}
// Public signature: /C.foo|-3585887913961670341[0]
// Public signature debug description: foo(kotlin.Any){}
override fun foo(i: Any): Unit
}
// CHECK:
// Mangled name: D
// Public signature: /D|null[0]
data class D : Java3 {
// CHECK:
// Mangled name: D{}a
// Public signature: /D.a|-1200697420457237799[0]
// Public signature debug description: {}a
val a: Int
// CHECK JVM_IR:
// Mangled name: D#<get-a>(){}kotlin.Int
// Public signature: /D.a.<get-a>|4232747788241509192[0]
// Public signature debug description: <get-a>(){}kotlin.Int
get
// CHECK:
// Mangled name: D#<init>(kotlin.Int){}
// Public signature: /D.<init>|-5182794243525578284[0]
// Public signature debug description: <init>(kotlin.Int){}
constructor(a: Int) /* primary */
// CHECK JVM_IR:
// Mangled name: D#component1(){}kotlin.Int
// Public signature: /D.component1|-8217597213800111288[0]
// Public signature debug description: component1(){}kotlin.Int
override operator fun component1(): Int
// CHECK JVM_IR:
// Mangled name: D#copy(kotlin.Int){}D
// Public signature: /D.copy|-9038476566104378393[0]
// Public signature debug description: copy(kotlin.Int){}D
fun copy(a: Int): D
// CHECK JVM_IR:
// Mangled name: D#equals(kotlin.Any?){}kotlin.Boolean
// Public signature: /D.equals|722809408929142791[0]
// Public signature debug description: equals(kotlin.Any?){}kotlin.Boolean
override operator fun equals(other: Any?): Boolean
// CHECK JVM_IR:
// Mangled name: D#hashCode(){}kotlin.Int
// Public signature: /D.hashCode|-8048879360829830756[0]
// Public signature debug description: hashCode(){}kotlin.Int
override fun hashCode(): Int
// CHECK JVM_IR:
// Mangled name: D#toString(){}kotlin.String
// Public signature: /D.toString|6958853723545266802[0]
// Public signature debug description: toString(){}kotlin.String
override fun toString(): String
// CHECK:
// Mangled name: D#foo(kotlin.Any){}
// Public signature: /D.foo|-3585887913961670341[0]
// Public signature debug description: foo(kotlin.Any){}
override fun foo(i: Any): Unit
}
// CHECK:
// Mangled name: KotlinInterface
// Public signature: /KotlinInterface|null[0]
interface KotlinInterface {
// CHECK JVM_IR:
// Mangled name: KotlinInterface#component1(){}kotlin.Int
// Public signature: /KotlinInterface.component1|-8217597213800111288[0]
// Public signature debug description: component1(){}kotlin.Int
abstract fun component1(): Int
// CHECK:
// Mangled name: KotlinInterface#foo(kotlin.Any){}
// Public signature: /KotlinInterface.foo|-3585887913961670341[0]
// Public signature debug description: foo(kotlin.Any){}
abstract fun foo(i: Any): Unit
}
// CHECK:
// Mangled name: #test(){}
// Public signature: /test|6620506149988718649[0]
// Public signature debug description: test(){}
fun test(): Unit