FIR2IR: fix problems with enum entry / anonymous object visibility

This commit is contained in:
Mikhail Glukhikh
2020-02-18 10:48:11 +03:00
parent 9f0ef77531
commit fdf4f477a6
35 changed files with 94 additions and 113 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: ANY
interface IBase {
fun foo(x: Int, s: String)
fun bar(): Int
+24 -24
View File
@@ -6,19 +6,19 @@ FILE fqName:<root> fileName:/enum.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum1 modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestEnum1>]'
ENUM_ENTRY name:TEST1
class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[<root>.TestEnum1]
class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:private superTypes:[<root>.TestEnum1]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum1.TEST1
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestEnum1'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[<root>.TestEnum1]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:private superTypes:[<root>.TestEnum1]'
ENUM_ENTRY name:TEST2
class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[<root>.TestEnum1]
class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:private superTypes:[<root>.TestEnum1]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum1.TEST2
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestEnum1'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[<root>.TestEnum1]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:private superTypes:[<root>.TestEnum1]'
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum1) returnType:kotlin.Array<<root>.TestEnum1>
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum1
BLOCK_BODY
@@ -79,29 +79,29 @@ FILE fqName:<root> fileName:/enum.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.TestEnum2 declared in <root>.TestEnum2.<get-x>' type=<root>.TestEnum2 origin=null
ENUM_ENTRY name:TEST1
class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[<root>.TestEnum2]
class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:private superTypes:[<root>.TestEnum2]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum2.TEST1
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum2'
x: CONST Int type=kotlin.Int value=1
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[<root>.TestEnum2]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:private superTypes:[<root>.TestEnum2]'
ENUM_ENTRY name:TEST2
class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[<root>.TestEnum2]
class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:private superTypes:[<root>.TestEnum2]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum2.TEST2
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum2'
x: CONST Int type=kotlin.Int value=2
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[<root>.TestEnum2]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:private superTypes:[<root>.TestEnum2]'
ENUM_ENTRY name:TEST3
class: CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:local superTypes:[<root>.TestEnum2]
class: CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:private superTypes:[<root>.TestEnum2]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum2.TEST3
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum2'
x: CONST Int type=kotlin.Int value=3
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:local superTypes:[<root>.TestEnum2]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:private superTypes:[<root>.TestEnum2]'
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum2) returnType:kotlin.Array<<root>.TestEnum2>
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum2
BLOCK_BODY
@@ -150,12 +150,12 @@ FILE fqName:<root> fileName:/enum.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum3 modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestEnum3>]'
ENUM_ENTRY name:TEST
class: CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:local superTypes:[<root>.TestEnum3]
class: CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:private superTypes:[<root>.TestEnum3]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum3.TEST
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestEnum3'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:local superTypes:[<root>.TestEnum3]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:private superTypes:[<root>.TestEnum3]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.TestEnum3.TEST) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum3.TEST
BLOCK_BODY
@@ -223,26 +223,26 @@ FILE fqName:<root> fileName:/enum.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.TestEnum4 declared in <root>.TestEnum4.<get-x>' type=<root>.TestEnum4 origin=null
ENUM_ENTRY name:TEST1
class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[<root>.TestEnum4]
class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:private superTypes:[<root>.TestEnum4]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum4.TEST1
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum4'
x: CONST Int type=kotlin.Int value=1
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[<root>.TestEnum4]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:private superTypes:[<root>.TestEnum4]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.TestEnum4.TEST1) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum4.TEST1
BLOCK_BODY
CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null
message: GET_ENUM 'ENUM_ENTRY name:TEST1' type=<root>.TestEnum4
ENUM_ENTRY name:TEST2
class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[<root>.TestEnum4]
class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:private superTypes:[<root>.TestEnum4]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum4.TEST2
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum4'
x: CONST Int type=kotlin.Int value=2
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[<root>.TestEnum4]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:private superTypes:[<root>.TestEnum4]'
PROPERTY name:z visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Int visibility:private [final]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-z> visibility:public modality:FINAL <> ($this:<root>.TestEnum4.TEST2) returnType:kotlin.Int
@@ -326,27 +326,27 @@ FILE fqName:<root> fileName:/enum.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.TestEnum5 declared in <root>.TestEnum5.<get-x>' type=<root>.TestEnum5 origin=null
ENUM_ENTRY name:TEST1
class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[<root>.TestEnum5]
class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:private superTypes:[<root>.TestEnum5]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum5.TEST1
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum5'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[<root>.TestEnum5]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:private superTypes:[<root>.TestEnum5]'
ENUM_ENTRY name:TEST2
class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[<root>.TestEnum5]
class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:private superTypes:[<root>.TestEnum5]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum5.TEST2
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum5'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[<root>.TestEnum5]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:private superTypes:[<root>.TestEnum5]'
ENUM_ENTRY name:TEST3
class: CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:local superTypes:[<root>.TestEnum5]
class: CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:private superTypes:[<root>.TestEnum5]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum5.TEST3
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum5'
x: CONST Int type=kotlin.Int value=0
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:local superTypes:[<root>.TestEnum5]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:private superTypes:[<root>.TestEnum5]'
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum5) returnType:kotlin.Array<<root>.TestEnum5>
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum5
BLOCK_BODY
@@ -423,14 +423,14 @@ FILE fqName:<root> fileName:/enum.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.TestEnum6 declared in <root>.TestEnum6.<get-y>' type=<root>.TestEnum6 origin=null
ENUM_ENTRY name:TEST
class: CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:local superTypes:[<root>.TestEnum6]
class: CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:private superTypes:[<root>.TestEnum6]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum6.TEST
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int, y: kotlin.Int) [primary] declared in <root>.TestEnum6'
x: CALL 'public final fun f (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
y: CALL 'public final fun f (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:local superTypes:[<root>.TestEnum6]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:private superTypes:[<root>.TestEnum6]'
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum6) returnType:kotlin.Array<<root>.TestEnum6>
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum6
BLOCK_BODY
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: ANY
// WITH_RUNTIME
enum class TestEnum1 {
+14 -14
View File
@@ -6,12 +6,12 @@ FILE fqName:<root> fileName:/enumClassModality.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestFinalEnum1 modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestFinalEnum1>]'
ENUM_ENTRY name:X1
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestFinalEnum1]
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestFinalEnum1]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestFinalEnum1.X1
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestFinalEnum1'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestFinalEnum1]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestFinalEnum1]'
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestFinalEnum1) returnType:kotlin.Array<<root>.TestFinalEnum1>
$this: VALUE_PARAMETER name:<this> type:<root>.TestFinalEnum1
BLOCK_BODY
@@ -72,13 +72,13 @@ FILE fqName:<root> fileName:/enumClassModality.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.TestFinalEnum2 declared in <root>.TestFinalEnum2.<get-x>' type=<root>.TestFinalEnum2 origin=null
ENUM_ENTRY name:X1
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestFinalEnum2]
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestFinalEnum2]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestFinalEnum2.X1
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestFinalEnum2'
x: CONST Int type=kotlin.Int value=1
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestFinalEnum2]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestFinalEnum2]'
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestFinalEnum2) returnType:kotlin.Array<<root>.TestFinalEnum2>
$this: VALUE_PARAMETER name:<this> type:<root>.TestFinalEnum2
BLOCK_BODY
@@ -127,12 +127,12 @@ FILE fqName:<root> fileName:/enumClassModality.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestFinalEnum3 modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestFinalEnum3>]'
ENUM_ENTRY name:X1
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestFinalEnum3]
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestFinalEnum3]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestFinalEnum3.X1
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestFinalEnum3'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestFinalEnum3]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestFinalEnum3]'
FUN name:doStuff visibility:public modality:FINAL <> ($this:<root>.TestFinalEnum3) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.TestFinalEnum3
BLOCK_BODY
@@ -184,12 +184,12 @@ FILE fqName:<root> fileName:/enumClassModality.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestOpenEnum1 modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestOpenEnum1>]'
ENUM_ENTRY name:X1
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestOpenEnum1]
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestOpenEnum1]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestOpenEnum1.X1
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestOpenEnum1'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestOpenEnum1]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestOpenEnum1]'
FUN name:toString visibility:public modality:FINAL <> ($this:<root>.TestOpenEnum1.X1) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.TestOpenEnum1.X1
BLOCK_BODY
@@ -243,12 +243,12 @@ FILE fqName:<root> fileName:/enumClassModality.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestOpenEnum2 modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestOpenEnum2>]'
ENUM_ENTRY name:X1
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestOpenEnum2]
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestOpenEnum2]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestOpenEnum2.X1
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestOpenEnum2'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestOpenEnum2]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestOpenEnum2]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.TestOpenEnum2.X1) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.TestOpenEnum2.X1
BLOCK_BODY
@@ -303,12 +303,12 @@ FILE fqName:<root> fileName:/enumClassModality.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestAbstractEnum1 modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestAbstractEnum1>]'
ENUM_ENTRY name:X1
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestAbstractEnum1]
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestAbstractEnum1]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestAbstractEnum1.X1
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestAbstractEnum1'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestAbstractEnum1]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestAbstractEnum1]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.TestAbstractEnum1.X1) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.TestAbstractEnum1.X1
BLOCK_BODY
@@ -379,12 +379,12 @@ FILE fqName:<root> fileName:/enumClassModality.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestAbstractEnum2 modality:FINAL visibility:public superTypes:[<root>.IFoo; kotlin.Enum<<root>.TestAbstractEnum2>]'
ENUM_ENTRY name:X1
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestAbstractEnum2]
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestAbstractEnum2]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestAbstractEnum2.X1
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestAbstractEnum2'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[<root>.TestAbstractEnum2]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestAbstractEnum2]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.TestAbstractEnum2.X1) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.TestAbstractEnum2.X1
BLOCK_BODY
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: ANY
enum class TestFinalEnum1 {
X1
}
@@ -2,20 +2,20 @@ FILE fqName:<root> fileName:/enumWithMultipleCtors.kt
CLASS ENUM_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.A>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
ENUM_ENTRY name:X
class: CLASS ENUM_ENTRY name:X modality:FINAL visibility:local superTypes:[<root>.A]
class: CLASS ENUM_ENTRY name:X modality:FINAL visibility:private superTypes:[<root>.A]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A.X
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (arg: kotlin.String) declared in <root>.A'
arg: CONST String type=kotlin.String value="asd"
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X modality:FINAL visibility:local superTypes:[<root>.A]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X modality:FINAL visibility:private superTypes:[<root>.A]'
ENUM_ENTRY name:Y
class: CLASS ENUM_ENTRY name:Y modality:FINAL visibility:local superTypes:[<root>.A]
class: CLASS ENUM_ENTRY name:Y modality:FINAL visibility:private superTypes:[<root>.A]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A.Y
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (arg: kotlin.String) declared in <root>.A'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:Y modality:FINAL visibility:local superTypes:[<root>.A]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:Y modality:FINAL visibility:private superTypes:[<root>.A]'
FUN name:f visibility:public modality:FINAL <> ($this:<root>.A.Y) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.A.Y
BLOCK_BODY
@@ -25,13 +25,13 @@ FILE fqName:<root> fileName:/enumWithMultipleCtors.kt
$this: GET_VAR '<this>: <root>.A.Y declared in <root>.A.Y.f' type=<root>.A.Y origin=null
other: CONST String type=kotlin.String value="#Y"
ENUM_ENTRY name:Z
class: CLASS ENUM_ENTRY name:Z modality:FINAL visibility:local superTypes:[<root>.A]
class: CLASS ENUM_ENTRY name:Z modality:FINAL visibility:private superTypes:[<root>.A]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A.Z
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (arg: kotlin.String) declared in <root>.A'
arg: CONST Int type=kotlin.Int value=5
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:Z modality:FINAL visibility:local superTypes:[<root>.A]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:Z modality:FINAL visibility:private superTypes:[<root>.A]'
PROPERTY name:prop1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:prop1 type:kotlin.String visibility:private [final]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-prop1> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.String
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: ANY
enum class A {
X("asd"),
Y() {
@@ -18,12 +18,12 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Test0 declared in <root>.Test0.<get-x>' type=<root>.Test0 origin=null
ENUM_ENTRY name:ZERO
class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:local superTypes:[<root>.Test0]
class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:private superTypes:[<root>.Test0]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test0.ZERO
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test0'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:local superTypes:[<root>.Test0]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:private superTypes:[<root>.Test0]'
CONSTRUCTOR visibility:private <> () returnType:<root>.Test0
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test0'
@@ -88,20 +88,20 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.<get-x>' type=<root>.Test1 origin=null
ENUM_ENTRY name:ZERO
class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:local superTypes:[<root>.Test1]
class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:private superTypes:[<root>.Test1]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test1.ZERO
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test1'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:local superTypes:[<root>.Test1]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:private superTypes:[<root>.Test1]'
ENUM_ENTRY name:ONE
class: CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:local superTypes:[<root>.Test1]
class: CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:private superTypes:[<root>.Test1]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test1.ONE
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test1'
x: CONST Int type=kotlin.Int value=1
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:local superTypes:[<root>.Test1]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:private superTypes:[<root>.Test1]'
CONSTRUCTOR visibility:private <> () returnType:<root>.Test1
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test1'
@@ -166,25 +166,25 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<get-x>' type=<root>.Test2 origin=null
ENUM_ENTRY name:ZERO
class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:local superTypes:[<root>.Test2]
class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:private superTypes:[<root>.Test2]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test2.ZERO
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test2'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:local superTypes:[<root>.Test2]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:private superTypes:[<root>.Test2]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.Test2.ZERO) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Test2.ZERO
BLOCK_BODY
CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value="ZERO"
ENUM_ENTRY name:ONE
class: CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:local superTypes:[<root>.Test2]
class: CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:private superTypes:[<root>.Test2]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test2.ONE
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<anonymous> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test2'
x: CONST Int type=kotlin.Int value=1
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:local superTypes:[<root>.Test2]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:private superTypes:[<root>.Test2]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.Test2.ONE) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Test2.ONE
BLOCK_BODY
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: ANY
// WITH_RUNTIME
enum class Test0(val x: Int) {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: ANY
data class A(val runA: A.(String) -> Unit = {})
data class B(val x: Any = object {})
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: ANY
// WITH_RUNTIME
interface IFoo {