From ee6d432cedd664006f618812dc66b90b9d9ff9d2 Mon Sep 17 00:00:00 2001 From: Georgy Bronnikov Date: Thu, 18 Jun 2020 12:22:41 +0300 Subject: [PATCH] Add forgotten test files --- .../codegen/bytecodeText/javaFields.kt | 23 +++ .../javaFieldsWithIntersectionTypes.kt | 39 ++++ .../jvmFieldReferenceWithIntersectionTypes.kt | 32 ++++ .../jvmFieldWithIntersectionTypes.fir.txt | 148 +++++++++++++++ .../jvmFieldWithIntersectionTypes.txt | 171 ++++++++++++++++++ 5 files changed, 413 insertions(+) create mode 100644 compiler/testData/codegen/bytecodeText/javaFields.kt create mode 100644 compiler/testData/codegen/bytecodeText/javaFieldsWithIntersectionTypes.kt create mode 100644 compiler/testData/ir/irText/expressions/jvmFieldReferenceWithIntersectionTypes.kt create mode 100644 compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.fir.txt create mode 100644 compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.txt diff --git a/compiler/testData/codegen/bytecodeText/javaFields.kt b/compiler/testData/codegen/bytecodeText/javaFields.kt new file mode 100644 index 00000000000..a3afb7bb6ff --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/javaFields.kt @@ -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 \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/javaFieldsWithIntersectionTypes.kt b/compiler/testData/codegen/bytecodeText/javaFieldsWithIntersectionTypes.kt new file mode 100644 index 00000000000..1fd5705907d --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/javaFieldsWithIntersectionTypes.kt @@ -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 diff --git a/compiler/testData/ir/irText/expressions/jvmFieldReferenceWithIntersectionTypes.kt b/compiler/testData/ir/irText/expressions/jvmFieldReferenceWithIntersectionTypes.kt new file mode 100644 index 00000000000..8b5af30ed25 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/jvmFieldReferenceWithIntersectionTypes.kt @@ -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 +} diff --git a/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.fir.txt b/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.fir.txt new file mode 100644 index 00000000000..a1698368bd8 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.fir.txt @@ -0,0 +1,148 @@ +FILE fqName: fileName:/jvmFieldWithIntersectionTypes.kt + CLASS INTERFACE name:IFoo modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.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: 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: 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: type:kotlin.Any + CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[.JFieldOwner; .IFoo] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Derived1 + CONSTRUCTOR visibility:public <> () returnType:.Derived1 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .JFieldOwner' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[.JFieldOwner; .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: 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: 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: type:kotlin.Any + CLASS CLASS name:Derived2 modality:FINAL visibility:public superTypes:[.JFieldOwner; .IFoo] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Derived2 + CONSTRUCTOR visibility:public <> () returnType:.Derived2 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .JFieldOwner' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived2 modality:FINAL visibility:public superTypes:[.JFieldOwner; .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: 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: 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: type:kotlin.Any + CLASS CLASS name:Mid modality:OPEN visibility:public superTypes:[.JFieldOwner] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Mid + CONSTRUCTOR visibility:public <> () returnType:.Mid [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .JFieldOwner' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Mid modality:OPEN visibility:public superTypes:[.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: 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: 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: type:kotlin.Any + CLASS CLASS name:DerivedThroughMid1 modality:FINAL visibility:public superTypes:[.Mid; .IFoo] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.DerivedThroughMid1 + CONSTRUCTOR visibility:public <> () returnType:.DerivedThroughMid1 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Mid' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DerivedThroughMid1 modality:FINAL visibility:public superTypes:[.Mid; .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: 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: 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: type:kotlin.Any + CLASS CLASS name:DerivedThroughMid2 modality:FINAL visibility:public superTypes:[.Mid; .IFoo] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.DerivedThroughMid2 + CONSTRUCTOR visibility:public <> () returnType:.DerivedThroughMid2 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Mid' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DerivedThroughMid2 modality:FINAL visibility:public superTypes:[.Mid; .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: 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: 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: 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:.Derived1 [val] + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Derived1' type=.Derived1 origin=null + VAR name:d2 type:.Derived2 [val] + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Derived2' type=.Derived2 origin=null + VAR name:k type:.JFieldOwner [val] + WHEN type=.JFieldOwner origin=IF + BRANCH + if: GET_VAR 'b: kotlin.Boolean declared in .test' type=kotlin.Boolean origin=null + then: GET_VAR 'val d1: .Derived1 [val] declared in .test' type=.Derived1 origin=null + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: GET_VAR 'val d2: .Derived2 [val] declared in .test' type=.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: .JFieldOwner [val] declared in .test' type=.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: .JFieldOwner [val] declared in .test' type=.JFieldOwner origin=null + VAR name:md1 type:.DerivedThroughMid1 [val] + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .DerivedThroughMid1' type=.DerivedThroughMid1 origin=null + VAR name:md2 type:.DerivedThroughMid2 [val] + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .DerivedThroughMid2' type=.DerivedThroughMid2 origin=null + VAR name:mk type:.Mid [val] + WHEN type=.Mid origin=IF + BRANCH + if: GET_VAR 'b: kotlin.Boolean declared in .test' type=kotlin.Boolean origin=null + then: GET_VAR 'val md1: .DerivedThroughMid1 [val] declared in .test' type=.DerivedThroughMid1 origin=null + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: GET_VAR 'val md2: .DerivedThroughMid2 [val] declared in .test' type=.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: .Mid [val] declared in .test' type=.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: .Mid [val] declared in .test' type=.Mid origin=null diff --git a/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.txt b/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.txt new file mode 100644 index 00000000000..dd781fbd101 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.txt @@ -0,0 +1,171 @@ +FILE fqName: fileName:/jvmFieldWithIntersectionTypes.kt + CLASS INTERFACE name:IFoo modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.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: 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: 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: type:kotlin.Any + CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[.JFieldOwner; .IFoo] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Derived1 + CONSTRUCTOR visibility:public <> () returnType:.Derived1 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .JFieldOwner' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[.JFieldOwner; .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 .JFieldOwner + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .IFoo + $this: VALUE_PARAMETER name: 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 .JFieldOwner + public open fun hashCode (): kotlin.Int [fake_override] declared in .IFoo + $this: VALUE_PARAMETER name: 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 .JFieldOwner + public open fun toString (): kotlin.String [fake_override] declared in .IFoo + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:Derived2 modality:FINAL visibility:public superTypes:[.JFieldOwner; .IFoo] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Derived2 + CONSTRUCTOR visibility:public <> () returnType:.Derived2 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .JFieldOwner' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived2 modality:FINAL visibility:public superTypes:[.JFieldOwner; .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 .JFieldOwner + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .IFoo + $this: VALUE_PARAMETER name: 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 .JFieldOwner + public open fun hashCode (): kotlin.Int [fake_override] declared in .IFoo + $this: VALUE_PARAMETER name: 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 .JFieldOwner + public open fun toString (): kotlin.String [fake_override] declared in .IFoo + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:Mid modality:OPEN visibility:public superTypes:[.JFieldOwner] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Mid + CONSTRUCTOR visibility:public <> () returnType:.Mid [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .JFieldOwner' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Mid modality:OPEN visibility:public superTypes:[.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 .JFieldOwner + $this: VALUE_PARAMETER name: 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 .JFieldOwner + $this: VALUE_PARAMETER name: 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 .JFieldOwner + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:DerivedThroughMid1 modality:FINAL visibility:public superTypes:[.Mid; .IFoo] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.DerivedThroughMid1 + CONSTRUCTOR visibility:public <> () returnType:.DerivedThroughMid1 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Mid' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DerivedThroughMid1 modality:FINAL visibility:public superTypes:[.Mid; .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 .Mid + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .IFoo + $this: VALUE_PARAMETER name: 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 .Mid + public open fun hashCode (): kotlin.Int [fake_override] declared in .IFoo + $this: VALUE_PARAMETER name: 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 .Mid + public open fun toString (): kotlin.String [fake_override] declared in .IFoo + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:DerivedThroughMid2 modality:FINAL visibility:public superTypes:[.Mid; .IFoo] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.DerivedThroughMid2 + CONSTRUCTOR visibility:public <> () returnType:.DerivedThroughMid2 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Mid' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DerivedThroughMid2 modality:FINAL visibility:public superTypes:[.Mid; .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 .Mid + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .IFoo + $this: VALUE_PARAMETER name: 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 .Mid + public open fun hashCode (): kotlin.Int [fake_override] declared in .IFoo + $this: VALUE_PARAMETER name: 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 .Mid + public open fun toString (): kotlin.String [fake_override] declared in .IFoo + $this: VALUE_PARAMETER name: 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:.Derived1 [val] + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Derived1' type=.Derived1 origin=null + VAR name:d2 type:.Derived2 [val] + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Derived2' type=.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 .test' type=kotlin.Boolean origin=null + then: GET_VAR 'val d1: .Derived1 [val] declared in .test' type=.Derived1 origin=null + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: GET_VAR 'val d2: .Derived2 [val] declared in .test' type=.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=.JFieldOwner origin=IMPLICIT_CAST typeOperand=.JFieldOwner + GET_VAR 'val k: kotlin.Any [val] declared in .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=.JFieldOwner origin=IMPLICIT_CAST typeOperand=.JFieldOwner + GET_VAR 'val k: kotlin.Any [val] declared in .test' type=kotlin.Any origin=null + VAR name:md1 type:.DerivedThroughMid1 [val] + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .DerivedThroughMid1' type=.DerivedThroughMid1 origin=null + VAR name:md2 type:.DerivedThroughMid2 [val] + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .DerivedThroughMid2' type=.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 .test' type=kotlin.Boolean origin=null + then: GET_VAR 'val md1: .DerivedThroughMid1 [val] declared in .test' type=.DerivedThroughMid1 origin=null + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: GET_VAR 'val md2: .DerivedThroughMid2 [val] declared in .test' type=.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=.Mid origin=IMPLICIT_CAST typeOperand=.Mid + GET_VAR 'val mk: kotlin.Any [val] declared in .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=.Mid origin=IMPLICIT_CAST typeOperand=.Mid + GET_VAR 'val mk: kotlin.Any [val] declared in .test' type=kotlin.Any origin=null