Add forgotten test files

This commit is contained in:
Georgy Bronnikov
2020-06-18 12:22:41 +03:00
parent cf6eb138ce
commit ee6d432ced
5 changed files with 413 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
// FILE: Java1.java
public class Java1 {
public int f;
}
// FILE: Java2.java
public class Java2 extends Kotlin1 {
}
// FILE: test.kt
open class Kotlin1 : Java1()
open class Kotlin2 : Java2() {
fun getF() = super.f
}
fun test1(j: Kotlin2) = j.f
// @Kotlin2.class:
// 1 GETFIELD Java2.f : I
// @TestKt.class:
// 1 GETFIELD Kotlin2.f : I
@@ -0,0 +1,39 @@
// !LANGUAGE: +NewInference
// (old inference fails in the frontend)
// FILE: JFieldOwner.java
public class JFieldOwner {
public int f;
}
// FILE: test.kt
interface IFoo
class Derived1 : JFieldOwner(), IFoo
class Derived2 : JFieldOwner(), IFoo
open class Mid : JFieldOwner()
class DerivedThroughMid1 : Mid(), IFoo
class DerivedThroughMid2 : Mid(), IFoo
fun test(b : Boolean) {
val d1 = Derived1()
val d2 = Derived2()
val k = if (b) d1 else d2
k.f = 42
k.f
val md1 = DerivedThroughMid1()
val md2 = DerivedThroughMid2()
val mk = if (b) md1 else md2
mk.f = 44
mk.f
}
// @TestKt.class:
// 1 GETFIELD JFieldOwner.f : I
// 1 PUTFIELD JFieldOwner.f : I
// 1 GETFIELD Mid.f : I
// 1 PUTFIELD Mid.f : I
@@ -0,0 +1,32 @@
// !LANGUAGE: +NewInference
// (old inference fails in the frontend)
// FILE: JFieldOwner.java
public class JFieldOwner {
public int f;
}
// FILE: jvmFieldWithIntersectionTypes.kt
interface IFoo
class Derived1 : JFieldOwner(), IFoo
class Derived2 : JFieldOwner(), IFoo
open class Mid : JFieldOwner()
class DerivedThroughMid1 : Mid(), IFoo
class DerivedThroughMid2 : Mid(), IFoo
fun test(b : Boolean) {
val d1 = Derived1()
val d2 = Derived2()
val k = if (b) d1 else d2
k.f = 42
k.f
val md1 = DerivedThroughMid1()
val md2 = DerivedThroughMid2()
val mk = if (b) md1 else md2
mk.f = 44
mk.f
}
@@ -0,0 +1,148 @@
FILE fqName:<root> fileName:/jvmFieldWithIntersectionTypes.kt
CLASS INTERFACE name:IFoo modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.IFoo
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 [operator] 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:Derived1 modality:FINAL visibility:public superTypes:[<root>.JFieldOwner; <root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Derived1
CONSTRUCTOR visibility:public <> () returnType:<root>.Derived1 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.JFieldOwner'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[<root>.JFieldOwner; <root>.IFoo]'
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 [operator] 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:Derived2 modality:FINAL visibility:public superTypes:[<root>.JFieldOwner; <root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Derived2
CONSTRUCTOR visibility:public <> () returnType:<root>.Derived2 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.JFieldOwner'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived2 modality:FINAL visibility:public superTypes:[<root>.JFieldOwner; <root>.IFoo]'
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 [operator] 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:Mid modality:OPEN visibility:public superTypes:[<root>.JFieldOwner]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Mid
CONSTRUCTOR visibility:public <> () returnType:<root>.Mid [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.JFieldOwner'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Mid modality:OPEN visibility:public superTypes:[<root>.JFieldOwner]'
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 [operator] 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:DerivedThroughMid1 modality:FINAL visibility:public superTypes:[<root>.Mid; <root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.DerivedThroughMid1
CONSTRUCTOR visibility:public <> () returnType:<root>.DerivedThroughMid1 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Mid'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DerivedThroughMid1 modality:FINAL visibility:public superTypes:[<root>.Mid; <root>.IFoo]'
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 [operator] 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:DerivedThroughMid2 modality:FINAL visibility:public superTypes:[<root>.Mid; <root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.DerivedThroughMid2
CONSTRUCTOR visibility:public <> () returnType:<root>.DerivedThroughMid2 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Mid'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DerivedThroughMid2 modality:FINAL visibility:public superTypes:[<root>.Mid; <root>.IFoo]'
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 [operator] 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:test visibility:public modality:FINAL <> (b:kotlin.Boolean) returnType:kotlin.Unit
VALUE_PARAMETER name:b index:0 type:kotlin.Boolean
BLOCK_BODY
VAR name:d1 type:<root>.Derived1 [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Derived1' type=<root>.Derived1 origin=null
VAR name:d2 type:<root>.Derived2 [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Derived2' type=<root>.Derived2 origin=null
VAR name:k type:<root>.JFieldOwner [val]
WHEN type=<root>.JFieldOwner origin=IF
BRANCH
if: GET_VAR 'b: kotlin.Boolean declared in <root>.test' type=kotlin.Boolean origin=null
then: GET_VAR 'val d1: <root>.Derived1 [val] declared in <root>.test' type=<root>.Derived1 origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val d2: <root>.Derived2 [val] declared in <root>.test' type=<root>.Derived2 origin=null
SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Unit origin=EQ
receiver: GET_VAR 'val k: <root>.JFieldOwner [val] declared in <root>.test' type=<root>.JFieldOwner origin=null
value: CONST Int type=kotlin.Int value=42
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Int origin=GET_PROPERTY
receiver: GET_VAR 'val k: <root>.JFieldOwner [val] declared in <root>.test' type=<root>.JFieldOwner origin=null
VAR name:md1 type:<root>.DerivedThroughMid1 [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.DerivedThroughMid1' type=<root>.DerivedThroughMid1 origin=null
VAR name:md2 type:<root>.DerivedThroughMid2 [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.DerivedThroughMid2' type=<root>.DerivedThroughMid2 origin=null
VAR name:mk type:<root>.Mid [val]
WHEN type=<root>.Mid origin=IF
BRANCH
if: GET_VAR 'b: kotlin.Boolean declared in <root>.test' type=kotlin.Boolean origin=null
then: GET_VAR 'val md1: <root>.DerivedThroughMid1 [val] declared in <root>.test' type=<root>.DerivedThroughMid1 origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val md2: <root>.DerivedThroughMid2 [val] declared in <root>.test' type=<root>.DerivedThroughMid2 origin=null
SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Unit origin=EQ
receiver: GET_VAR 'val mk: <root>.Mid [val] declared in <root>.test' type=<root>.Mid origin=null
value: CONST Int type=kotlin.Int value=44
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Int origin=GET_PROPERTY
receiver: GET_VAR 'val mk: <root>.Mid [val] declared in <root>.test' type=<root>.Mid origin=null
@@ -0,0 +1,171 @@
FILE fqName:<root> fileName:/jvmFieldWithIntersectionTypes.kt
CLASS INTERFACE name:IFoo modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.IFoo
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 [operator] 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:Derived1 modality:FINAL visibility:public superTypes:[<root>.JFieldOwner; <root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Derived1
CONSTRUCTOR visibility:public <> () returnType:<root>.Derived1 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.JFieldOwner'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[<root>.JFieldOwner; <root>.IFoo]'
PROPERTY FAKE_OVERRIDE name:f visibility:public modality:FINAL [fake_override,var]
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 [fake_override,operator] declared in <root>.JFieldOwner
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.IFoo
$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 [fake_override] declared in <root>.JFieldOwner
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.IFoo
$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 [fake_override] declared in <root>.JFieldOwner
public open fun toString (): kotlin.String [fake_override] declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:Derived2 modality:FINAL visibility:public superTypes:[<root>.JFieldOwner; <root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Derived2
CONSTRUCTOR visibility:public <> () returnType:<root>.Derived2 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.JFieldOwner'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived2 modality:FINAL visibility:public superTypes:[<root>.JFieldOwner; <root>.IFoo]'
PROPERTY FAKE_OVERRIDE name:f visibility:public modality:FINAL [fake_override,var]
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 [fake_override,operator] declared in <root>.JFieldOwner
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.IFoo
$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 [fake_override] declared in <root>.JFieldOwner
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.IFoo
$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 [fake_override] declared in <root>.JFieldOwner
public open fun toString (): kotlin.String [fake_override] declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:Mid modality:OPEN visibility:public superTypes:[<root>.JFieldOwner]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Mid
CONSTRUCTOR visibility:public <> () returnType:<root>.Mid [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.JFieldOwner'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Mid modality:OPEN visibility:public superTypes:[<root>.JFieldOwner]'
PROPERTY FAKE_OVERRIDE name:f visibility:public modality:FINAL [fake_override,var]
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 [fake_override,operator] declared in <root>.JFieldOwner
$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 [fake_override] declared in <root>.JFieldOwner
$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 [fake_override] declared in <root>.JFieldOwner
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:DerivedThroughMid1 modality:FINAL visibility:public superTypes:[<root>.Mid; <root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.DerivedThroughMid1
CONSTRUCTOR visibility:public <> () returnType:<root>.DerivedThroughMid1 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Mid'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DerivedThroughMid1 modality:FINAL visibility:public superTypes:[<root>.Mid; <root>.IFoo]'
PROPERTY FAKE_OVERRIDE name:f visibility:public modality:FINAL [fake_override,var]
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 [fake_override,operator] declared in <root>.Mid
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.IFoo
$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 [fake_override] declared in <root>.Mid
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.IFoo
$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 [fake_override] declared in <root>.Mid
public open fun toString (): kotlin.String [fake_override] declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:DerivedThroughMid2 modality:FINAL visibility:public superTypes:[<root>.Mid; <root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.DerivedThroughMid2
CONSTRUCTOR visibility:public <> () returnType:<root>.DerivedThroughMid2 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Mid'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DerivedThroughMid2 modality:FINAL visibility:public superTypes:[<root>.Mid; <root>.IFoo]'
PROPERTY FAKE_OVERRIDE name:f visibility:public modality:FINAL [fake_override,var]
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 [fake_override,operator] declared in <root>.Mid
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.IFoo
$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 [fake_override] declared in <root>.Mid
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.IFoo
$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 [fake_override] declared in <root>.Mid
public open fun toString (): kotlin.String [fake_override] declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:test visibility:public modality:FINAL <> (b:kotlin.Boolean) returnType:kotlin.Unit
VALUE_PARAMETER name:b index:0 type:kotlin.Boolean
BLOCK_BODY
VAR name:d1 type:<root>.Derived1 [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Derived1' type=<root>.Derived1 origin=null
VAR name:d2 type:<root>.Derived2 [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Derived2' type=<root>.Derived2 origin=null
VAR name:k type:kotlin.Any [val]
WHEN type=kotlin.Any origin=IF
BRANCH
if: GET_VAR 'b: kotlin.Boolean declared in <root>.test' type=kotlin.Boolean origin=null
then: GET_VAR 'val d1: <root>.Derived1 [val] declared in <root>.test' type=<root>.Derived1 origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val d2: <root>.Derived2 [val] declared in <root>.test' type=<root>.Derived2 origin=null
SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Unit origin=EQ
receiver: TYPE_OP type=<root>.JFieldOwner origin=IMPLICIT_CAST typeOperand=<root>.JFieldOwner
GET_VAR 'val k: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null
value: CONST Int type=kotlin.Int value=42
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Int origin=GET_PROPERTY
receiver: TYPE_OP type=<root>.JFieldOwner origin=IMPLICIT_CAST typeOperand=<root>.JFieldOwner
GET_VAR 'val k: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null
VAR name:md1 type:<root>.DerivedThroughMid1 [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.DerivedThroughMid1' type=<root>.DerivedThroughMid1 origin=null
VAR name:md2 type:<root>.DerivedThroughMid2 [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.DerivedThroughMid2' type=<root>.DerivedThroughMid2 origin=null
VAR name:mk type:kotlin.Any [val]
WHEN type=kotlin.Any origin=IF
BRANCH
if: GET_VAR 'b: kotlin.Boolean declared in <root>.test' type=kotlin.Boolean origin=null
then: GET_VAR 'val md1: <root>.DerivedThroughMid1 [val] declared in <root>.test' type=<root>.DerivedThroughMid1 origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val md2: <root>.DerivedThroughMid2 [val] declared in <root>.test' type=<root>.DerivedThroughMid2 origin=null
SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Unit origin=EQ
receiver: TYPE_OP type=<root>.Mid origin=IMPLICIT_CAST typeOperand=<root>.Mid
GET_VAR 'val mk: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null
value: CONST Int type=kotlin.Int value=44
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Int origin=GET_PROPERTY
receiver: TYPE_OP type=<root>.Mid origin=IMPLICIT_CAST typeOperand=<root>.Mid
GET_VAR 'val mk: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null