diff --git a/compiler/testData/ir/irText/types/intersectionType1.txt b/compiler/testData/ir/irText/types/intersectionType1.txt index 69dba2112e1..f64e19dd3af 100644 --- a/compiler/testData/ir/irText/types/intersectionType1.txt +++ b/compiler/testData/ir/irText/types/intersectionType1.txt @@ -37,8 +37,10 @@ FILE fqName: fileName:/intersectionType1.kt $receiver: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=.In origin=GET_ARRAY_ELEMENT $this: CALL 'public final fun select (x: S of .select, y: S of .select): S of .select declared in ' type=kotlin.Array.In> origin=null : kotlin.Array.In> - x: GET_VAR 'a: kotlin.Array<.In.foo>> declared in .foo' type=kotlin.Array<.In.foo>> origin=null - y: GET_VAR 'b: kotlin.Array<.In> declared in .foo' type=kotlin.Array<.In> origin=null + x: TYPE_OP type=kotlin.Array.In> origin=IMPLICIT_CAST typeOperand=kotlin.Array.In> + GET_VAR 'a: kotlin.Array<.In.foo>> declared in .foo' type=kotlin.Array<.In.foo>> origin=null + y: TYPE_OP type=kotlin.Array.In> origin=IMPLICIT_CAST typeOperand=kotlin.Array.In> + GET_VAR 'b: kotlin.Array<.In> declared in .foo' type=kotlin.Array<.In> origin=null index: CONST Int type=kotlin.Int value=0 y: CONST Boolean type=kotlin.Boolean value=true FUN name:ofType visibility:public modality:FINAL ($receiver:.In.ofType>, y:kotlin.Any?) returnType:kotlin.Boolean [inline] diff --git a/compiler/testData/ir/irText/types/intersectionType3.txt b/compiler/testData/ir/irText/types/intersectionType3.txt index 6e81ad54bfe..55b2a309881 100644 --- a/compiler/testData/ir/irText/types/intersectionType3.txt +++ b/compiler/testData/ir/irText/types/intersectionType3.txt @@ -141,8 +141,10 @@ FILE fqName: fileName:/intersectionType3.kt : kotlin.Any $receiver: CALL 'public final fun sel (x: S of .sel, y: S of .sel): S of .sel declared in ' type=.In origin=null : .In - x: GET_VAR 'x: .In<.A> declared in .testInIs1' type=.In<.A> origin=null - y: GET_VAR 'y: .In<.B> declared in .testInIs1' type=.In<.B> origin=null + x: TYPE_OP type=.In origin=IMPLICIT_CAST typeOperand=.In + GET_VAR 'x: .In<.A> declared in .testInIs1' type=.In<.A> origin=null + y: TYPE_OP type=.In origin=IMPLICIT_CAST typeOperand=.In + GET_VAR 'y: .In<.B> declared in .testInIs1' type=.In<.B> origin=null FUN name:testInIs2 visibility:public modality:FINAL <> (x:.In<.Z1>, y:.In<.Z2>) returnType:kotlin.Boolean VALUE_PARAMETER name:x index:0 type:.In<.Z1> VALUE_PARAMETER name:y index:1 type:.In<.Z2> @@ -152,8 +154,10 @@ FILE fqName: fileName:/intersectionType3.kt : kotlin.Any $receiver: CALL 'public final fun sel (x: S of .sel, y: S of .sel): S of .sel declared in ' type=.In origin=null : .In - x: GET_VAR 'x: .In<.Z1> declared in .testInIs2' type=.In<.Z1> origin=null - y: GET_VAR 'y: .In<.Z2> declared in .testInIs2' type=.In<.Z2> origin=null + x: TYPE_OP type=.In origin=IMPLICIT_CAST typeOperand=.In + GET_VAR 'x: .In<.Z1> declared in .testInIs2' type=.In<.Z1> origin=null + y: TYPE_OP type=.In origin=IMPLICIT_CAST typeOperand=.In + GET_VAR 'y: .In<.Z2> declared in .testInIs2' type=.In<.Z2> origin=null FUN name:testInIs3 visibility:public modality:FINAL <> (x:.In<.A1>, y:.In<.A2>) returnType:kotlin.Boolean VALUE_PARAMETER name:x index:0 type:.In<.A1> VALUE_PARAMETER name:y index:1 type:.In<.A2> @@ -163,8 +167,10 @@ FILE fqName: fileName:/intersectionType3.kt : .A $receiver: CALL 'public final fun sel (x: S of .sel, y: S of .sel): S of .sel declared in ' type=.In<.A> origin=null : .In<.A> - x: GET_VAR 'x: .In<.A1> declared in .testInIs3' type=.In<.A1> origin=null - y: GET_VAR 'y: .In<.A2> declared in .testInIs3' type=.In<.A2> origin=null + x: TYPE_OP type=.In<.A> origin=IMPLICIT_CAST typeOperand=.In<.A> + GET_VAR 'x: .In<.A1> declared in .testInIs3' type=.In<.A1> origin=null + y: TYPE_OP type=.In<.A> origin=IMPLICIT_CAST typeOperand=.In<.A> + GET_VAR 'y: .In<.A2> declared in .testInIs3' type=.In<.A2> origin=null FUN name:testInAs1 visibility:public modality:FINAL <> (x:.In<.A>, y:.In<.B>) returnType:kotlin.Unit VALUE_PARAMETER name:x index:0 type:.In<.A> VALUE_PARAMETER name:y index:1 type:.In<.B> @@ -174,8 +180,10 @@ FILE fqName: fileName:/intersectionType3.kt : kotlin.Any $receiver: CALL 'public final fun sel (x: S of .sel, y: S of .sel): S of .sel declared in ' type=.In origin=null : .In - x: GET_VAR 'x: .In<.A> declared in .testInAs1' type=.In<.A> origin=null - y: GET_VAR 'y: .In<.B> declared in .testInAs1' type=.In<.B> origin=null + x: TYPE_OP type=.In origin=IMPLICIT_CAST typeOperand=.In + GET_VAR 'x: .In<.A> declared in .testInAs1' type=.In<.A> origin=null + y: TYPE_OP type=.In origin=IMPLICIT_CAST typeOperand=.In + GET_VAR 'y: .In<.B> declared in .testInAs1' type=.In<.B> origin=null FUN name:testInAs2 visibility:public modality:FINAL <> (x:.In<.Z1>, y:.In<.Z2>) returnType:kotlin.Unit VALUE_PARAMETER name:x index:0 type:.In<.Z1> VALUE_PARAMETER name:y index:1 type:.In<.Z2> @@ -185,8 +193,10 @@ FILE fqName: fileName:/intersectionType3.kt : kotlin.Any $receiver: CALL 'public final fun sel (x: S of .sel, y: S of .sel): S of .sel declared in ' type=.In origin=null : .In - x: GET_VAR 'x: .In<.Z1> declared in .testInAs2' type=.In<.Z1> origin=null - y: GET_VAR 'y: .In<.Z2> declared in .testInAs2' type=.In<.Z2> origin=null + x: TYPE_OP type=.In origin=IMPLICIT_CAST typeOperand=.In + GET_VAR 'x: .In<.Z1> declared in .testInAs2' type=.In<.Z1> origin=null + y: TYPE_OP type=.In origin=IMPLICIT_CAST typeOperand=.In + GET_VAR 'y: .In<.Z2> declared in .testInAs2' type=.In<.Z2> origin=null FUN name:testInAs3 visibility:public modality:FINAL <> (x:.In<.A1>, y:.In<.A2>) returnType:kotlin.Unit VALUE_PARAMETER name:x index:0 type:.In<.A1> VALUE_PARAMETER name:y index:1 type:.In<.A2> @@ -196,5 +206,7 @@ FILE fqName: fileName:/intersectionType3.kt : .A $receiver: CALL 'public final fun sel (x: S of .sel, y: S of .sel): S of .sel declared in ' type=.In<.A> origin=null : .In<.A> - x: GET_VAR 'x: .In<.A1> declared in .testInAs3' type=.In<.A1> origin=null - y: GET_VAR 'y: .In<.A2> declared in .testInAs3' type=.In<.A2> origin=null + x: TYPE_OP type=.In<.A> origin=IMPLICIT_CAST typeOperand=.In<.A> + GET_VAR 'x: .In<.A1> declared in .testInAs3' type=.In<.A1> origin=null + y: TYPE_OP type=.In<.A> origin=IMPLICIT_CAST typeOperand=.In<.A> + GET_VAR 'y: .In<.A2> declared in .testInAs3' type=.In<.A2> origin=null diff --git a/compiler/testData/ir/irText/types/localVariableOfIntersectionType.txt b/compiler/testData/ir/irText/types/localVariableOfIntersectionType.txt index 4e3ef123a83..728302d8111 100644 --- a/compiler/testData/ir/irText/types/localVariableOfIntersectionType.txt +++ b/compiler/testData/ir/irText/types/localVariableOfIntersectionType.txt @@ -1,98 +1,98 @@ FILE fqName: fileName:/localVariableOfIntersectionType.kt CLASS INTERFACE name:In modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.In.In> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.In.In> TYPE_PARAMETER name:T index:0 variance:in superTypes:[kotlin.Any?] - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean 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 + $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 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 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any CLASS INTERFACE name:Inv modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Inv.Inv> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Inv.Inv> TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - PROPERTY name:t visibility:public modality:ABSTRACT [val] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.Inv.Inv>) returnType:T of .Inv - correspondingProperty: PROPERTY name:t visibility:public modality:ABSTRACT [val] - $this: VALUE_PARAMETER name: type:.Inv.Inv> - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean + PROPERTY name:t visibility:public modality:ABSTRACT [val] + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.Inv.Inv>) returnType:T of .Inv + correspondingProperty: PROPERTY name:t visibility:public modality:ABSTRACT [val] + $this: VALUE_PARAMETER name: type:.Inv.Inv> + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean 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 + $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 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 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any CLASS INTERFACE name:Z modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Z - FUN name:create visibility:public modality:ABSTRACT ($this:.Z, x:.In.Z.create>, y:.In.Z.create>) returnType:.Inv.Z.create> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Z + FUN name:create visibility:public modality:ABSTRACT ($this:.Z, x:.In.Z.create>, y:.In.Z.create>) returnType:.Inv.Z.create> TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.Z - VALUE_PARAMETER name:x index:0 type:.In.Z.create> - VALUE_PARAMETER name:y index:1 type:.In.Z.create> - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean + $this: VALUE_PARAMETER name: type:.Z + VALUE_PARAMETER name:x index:0 type:.In.Z.create> + VALUE_PARAMETER name:y index:1 type:.In.Z.create> + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean 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 + $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 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 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any CLASS INTERFACE name:IA modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.IA - FUN name:foo visibility:public modality:ABSTRACT <> ($this:.IA) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.IA - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.IA + FUN name:foo visibility:public modality:ABSTRACT <> ($this:.IA) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.IA + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean 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 + $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 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 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any CLASS INTERFACE name:IB modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.IB - FUN name:bar visibility:public modality:ABSTRACT <> ($this:.IB) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.IB - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.IB + FUN name:bar visibility:public modality:ABSTRACT <> ($this:.IB) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.IB + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean 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 + $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 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 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String 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 <> (a:.In<.IA>, b:.In<.IB>, z:.Z) returnType:kotlin.Unit - VALUE_PARAMETER name:a index:0 type:.In<.IA> - VALUE_PARAMETER name:b index:1 type:.In<.IB> - VALUE_PARAMETER name:z index:2 type:.Z + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:test visibility:public modality:FINAL <> (a:.In<.IA>, b:.In<.IB>, z:.Z) returnType:kotlin.Unit + VALUE_PARAMETER name:a index:0 type:.In<.IA> + VALUE_PARAMETER name:b index:1 type:.In<.IB> + VALUE_PARAMETER name:z index:2 type:.Z BLOCK_BODY CALL 'public abstract fun foo (): kotlin.Unit declared in .IA' type=kotlin.Unit origin=null $this: TYPE_OP type=.IA origin=IMPLICIT_CAST typeOperand=.IA @@ -110,7 +110,7 @@ FILE fqName: fileName:/localVariableOfIntersectionType.kt $this: GET_VAR 'z: .Z declared in .test' type=.Z origin=null x: GET_VAR 'a: .In<.IA> declared in .test' type=.In<.IA> origin=null y: GET_VAR 'b: .In<.IB> declared in .test' type=.In<.IB> origin=null - VAR name:t type:kotlin.Any [val] + VAR name:t type:kotlin.Any [val] TYPE_OP type=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any CALL 'public abstract fun (): T of .Inv declared in .Inv' type=kotlin.Any origin=GET_PROPERTY $this: CALL 'public abstract fun create (x: .In.Z.create>, y: .In.Z.create>): .Inv.Z.create> declared in .Z' type=.Inv origin=null