diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.txt index 7b7bd34869b..ea2684a369b 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.txt @@ -1,29 +1,49 @@ FILE fqName: fileName:/expectedEnumClass.kt CLASS ENUM_CLASS name:MyEnum modality:FINAL visibility:public flags: $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:MyEnum flags: + superClasses: + CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Enum modality:ABSTRACT visibility:public flags: ENUM_ENTRY name:FOO ENUM_ENTRY name:BAR FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:Any flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:clone visibility:protected modality:FINAL <> () returnType:Any flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:Unit flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> () returnType:Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:(java.lang.Class<(MyEnum..MyEnum?)>..java.lang.Class<(MyEnum..MyEnum?)>?) flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> () returnType:(java.lang.Class<(E..E?)>..java.lang.Class<(E..E?)>?) flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:MyEnum) returnType:Int flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:FINAL <> (other:E) returnType:Int flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: VALUE_PARAMETER name:other index:0 type:MyEnum flags: FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:Boolean flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:FINAL <> (other:kotlin.Any?) returnType:Boolean flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags: FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:Int flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:FINAL <> () returnType:Int flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: PROPERTY FAKE_OVERRIDE name:name type:kotlin.String visibility:public modality:FINAL flags:val FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:String flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name: visibility:public modality:FINAL <> () returnType:String flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: PROPERTY FAKE_OVERRIDE name:ordinal type:kotlin.Int visibility:public modality:FINAL flags:val FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:Int flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name: visibility:public modality:FINAL <> () returnType:Int flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:String flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> () returnType:String flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:Array flags: SYNTHETIC_BODY kind=ENUM_VALUES @@ -32,6 +52,8 @@ FILE fqName: fileName:/expectedEnumClass.kt SYNTHETIC_BODY kind=ENUM_VALUEOF CLASS ENUM_CLASS name:MyEnum modality:FINAL visibility:public flags: $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:MyEnum flags: + superClasses: + CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Enum modality:ABSTRACT visibility:public flags: CONSTRUCTOR visibility:private <> () returnType:MyEnum flags: BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' @@ -44,26 +66,44 @@ FILE fqName: fileName:/expectedEnumClass.kt ENUM_ENTRY name:BAZ init: ENUM_CONSTRUCTOR_CALL 'constructor MyEnum()' FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:Any flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:clone visibility:protected modality:FINAL <> () returnType:Any flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:Unit flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> () returnType:Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:(java.lang.Class<(MyEnum..MyEnum?)>..java.lang.Class<(MyEnum..MyEnum?)>?) flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> () returnType:(java.lang.Class<(E..E?)>..java.lang.Class<(E..E?)>?) flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:MyEnum) returnType:Int flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:FINAL <> (other:E) returnType:Int flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: VALUE_PARAMETER name:other index:0 type:MyEnum flags: FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:Boolean flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:FINAL <> (other:kotlin.Any?) returnType:Boolean flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags: FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:Int flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:FINAL <> () returnType:Int flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: PROPERTY FAKE_OVERRIDE name:name type:kotlin.String visibility:public modality:FINAL flags:val FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:String flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name: visibility:public modality:FINAL <> () returnType:String flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: PROPERTY FAKE_OVERRIDE name:ordinal type:kotlin.Int visibility:public modality:FINAL flags:val FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:Int flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name: visibility:public modality:FINAL <> () returnType:Int flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:String flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> () returnType:String flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:Array flags: SYNTHETIC_BODY kind=ENUM_VALUES diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.txt index fcbe225bc1c..393caeaff7e 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.txt @@ -1,47 +1,79 @@ FILE fqName: fileName:/expectedSealedClass.kt CLASS CLASS name:Ops modality:SEALED visibility:public flags: $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Ops flags: + superClasses: + CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags: CONSTRUCTOR visibility:private <> () returnType:Ops flags: FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> (other:kotlin.Any?) returnType:Boolean flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags: FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> () returnType:Int flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> () returnType:String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: CLASS CLASS name:Add modality:FINAL visibility:public flags: $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Add flags: + superClasses: + CLASS CLASS name:Ops modality:SEALED visibility:public flags: CONSTRUCTOR visibility:public <> () returnType:Add flags: FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags: + overridden: + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags: FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags: + overridden: + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags: + overridden: + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: CLASS CLASS name:Ops modality:SEALED visibility:public flags: $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Ops flags: + superClasses: + CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags: CONSTRUCTOR visibility:private <> () returnType:Ops flags: BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Ops' FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> (other:kotlin.Any?) returnType:Boolean flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags: FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> () returnType:Int flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> () returnType:String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: CLASS CLASS name:Add modality:FINAL visibility:public flags: $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Add flags: + superClasses: + CLASS CLASS name:Ops modality:SEALED visibility:public flags: CONSTRUCTOR visibility:public <> () returnType:Add flags: BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Ops()' INSTANCE_INITIALIZER_CALL classDescriptor='Add' FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags: + overridden: + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags: FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags: + overridden: + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags: + overridden: + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: diff --git a/compiler/testData/ir/irText/expressions/kt23030.txt b/compiler/testData/ir/irText/expressions/kt23030.txt index e78832e50a1..2049e03f38b 100644 --- a/compiler/testData/ir/irText/expressions/kt23030.txt +++ b/compiler/testData/ir/irText/expressions/kt23030.txt @@ -25,8 +25,10 @@ FILE fqName: fileName:/kt23030.kt if: WHEN type=kotlin.Boolean origin=ANDAND BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int + typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags: GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null then: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Char + typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Char modality:FINAL visibility:public flags: GET_VAR 'value-parameter y: Any' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -34,8 +36,10 @@ FILE fqName: fileName:/kt23030.kt then: CALL 'less(Int, Int): Boolean' type=kotlin.Boolean origin=LT arg0: CALL 'compareTo(Char) on Int: Int' type=kotlin.Int origin=LT $receiver: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int + typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags: GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null c: TYPE_OP type=kotlin.Char origin=IMPLICIT_CAST typeOperand=kotlin.Char + typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Char modality:FINAL visibility:public flags: GET_VAR 'value-parameter y: Any' type=kotlin.Any origin=null arg1: CONST Int type=kotlin.Int value=0 BRANCH @@ -51,8 +55,10 @@ FILE fqName: fileName:/kt23030.kt if: WHEN type=kotlin.Boolean origin=ANDAND BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int + typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags: GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null then: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Char + typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Char modality:FINAL visibility:public flags: GET_VAR 'value-parameter y: Any' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -65,6 +71,8 @@ FILE fqName: fileName:/kt23030.kt then: CONST Boolean type=kotlin.Boolean value=false CLASS CLASS name:C modality:FINAL visibility:public flags: $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:C flags: + superClasses: + CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags: CONSTRUCTOR visibility:public <> () returnType:C flags: BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' @@ -99,8 +107,10 @@ FILE fqName: fileName:/kt23030.kt if: WHEN type=kotlin.Boolean origin=ANDAND BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int + typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags: GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null then: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Char + typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Char modality:FINAL visibility:public flags: GET_VAR 'value-parameter y: Any' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -109,17 +119,25 @@ FILE fqName: fileName:/kt23030.kt arg0: CALL 'compareTo(Char) on Int: Int' type=kotlin.Int origin=LT $this: GET_VAR 'this@C: C' type=C origin=null $receiver: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int + typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags: GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null c: TYPE_OP type=kotlin.Char origin=IMPLICIT_CAST typeOperand=kotlin.Char + typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Char modality:FINAL visibility:public flags: GET_VAR 'value-parameter y: Any' type=kotlin.Any origin=null arg1: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> (other:kotlin.Any?) returnType:Boolean flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags: FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> () returnType:Int flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags: + overridden: + FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> () returnType:String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: