Enum entries generation (no underlying classes yet)
This commit is contained in:
committed by
Dmitry Petrov
parent
917e7bffbd
commit
bd76e39a8c
@@ -12,3 +12,4 @@ FILE /classes.kt
|
||||
CLASS ENUM_CLASS TestEnumClass
|
||||
FUN private constructor TestEnumClass()
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL Enum super
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
enum class TestEnum1 {
|
||||
TEST1, TEST2
|
||||
}
|
||||
|
||||
enum class TestEnum2(val x: Int) {
|
||||
TEST1(1),
|
||||
TEST2(2),
|
||||
TEST3(3)
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
FILE /enum.kt
|
||||
CLASS ENUM_CLASS TestEnum1
|
||||
FUN private constructor TestEnum1()
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL Enum super
|
||||
ENUM_ENTRY enum entry TEST1
|
||||
init: ENUM_CONSTRUCTOR_CALL TestEnum1 TEST1
|
||||
ENUM_ENTRY enum entry TEST2
|
||||
init: ENUM_CONSTRUCTOR_CALL TestEnum1 TEST2
|
||||
CLASS ENUM_CLASS TestEnum2
|
||||
FUN private constructor TestEnum2(/*0*/ x: kotlin.Int)
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL Enum super
|
||||
SET_BACKING_FIELD x type=kotlin.Unit operator=null
|
||||
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
PROPERTY public final val x: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
ENUM_ENTRY enum entry TEST1
|
||||
init: ENUM_CONSTRUCTOR_CALL TestEnum2 TEST1
|
||||
x: CONST Int type=kotlin.Int value='1'
|
||||
ENUM_ENTRY enum entry TEST2
|
||||
init: ENUM_CONSTRUCTOR_CALL TestEnum2 TEST2
|
||||
x: CONST Int type=kotlin.Int value='2'
|
||||
ENUM_ENTRY enum entry TEST3
|
||||
init: ENUM_CONSTRUCTOR_CALL TestEnum2 TEST3
|
||||
x: CONST Int type=kotlin.Int value='3'
|
||||
+3
-3
@@ -2,9 +2,9 @@ FILE /values.kt
|
||||
CLASS ENUM_CLASS Enum
|
||||
FUN private constructor Enum()
|
||||
BLOCK_BODY
|
||||
CLASS ENUM_ENTRY A
|
||||
FUN private constructor A()
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL Enum super
|
||||
ENUM_ENTRY enum entry A
|
||||
init: ENUM_CONSTRUCTOR_CALL Enum A
|
||||
CLASS OBJECT A
|
||||
FUN private constructor A()
|
||||
BLOCK_BODY
|
||||
|
||||
Reference in New Issue
Block a user