Drop enum class object hack
Place valueOf() and values() into the static scope of the corresponding enum class #KT-5580 Fixed #KT-2410 Fixed
This commit is contained in:
@@ -7,12 +7,6 @@ public final enum class EnumMembers : kotlin.Enum<test.EnumMembers> {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-EnumMembers> {
|
||||
private constructor <class-object-for-EnumMembers>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.EnumMembers
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.EnumMembers>
|
||||
}
|
||||
|
||||
public enum entry FIRST : test.EnumMembers {
|
||||
private constructor FIRST()
|
||||
public final override /*1*/ /*fake_override*/ val isFirst: kotlin.Boolean
|
||||
@@ -44,4 +38,8 @@ public final enum class EnumMembers : kotlin.Enum<test.EnumMembers> {
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.EnumMembers
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.EnumMembers>
|
||||
}
|
||||
|
||||
@@ -5,12 +5,6 @@ public final enum class JavaEnum : kotlin.Enum<test.JavaEnum> {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-JavaEnum> {
|
||||
private constructor <class-object-for-JavaEnum>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.JavaEnum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.JavaEnum>
|
||||
}
|
||||
|
||||
public enum entry ANOTHER : test.JavaEnum {
|
||||
private constructor ANOTHER()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
@@ -34,4 +28,8 @@ public final enum class JavaEnum : kotlin.Enum<test.JavaEnum> {
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.JavaEnum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.JavaEnum>
|
||||
}
|
||||
|
||||
@@ -12,12 +12,6 @@ public trait CustomAnnotation {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-MyEnum> {
|
||||
private constructor <class-object-for-MyEnum>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.CustomAnnotation.MyEnum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.CustomAnnotation.MyEnum>
|
||||
}
|
||||
|
||||
public enum entry ONE : test.CustomAnnotation.MyEnum {
|
||||
private constructor ONE()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
@@ -29,6 +23,10 @@ public trait CustomAnnotation {
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.CustomAnnotation.MyEnum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.CustomAnnotation.MyEnum>
|
||||
}
|
||||
|
||||
test.CustomAnnotation.MyAnnotation(value = MyEnum.ONE: test.CustomAnnotation.MyEnum) public open class MyTest {
|
||||
|
||||
@@ -5,12 +5,6 @@ public final enum class Enum : kotlin.Enum<test.Enum> {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-Enum> {
|
||||
private constructor <class-object-for-Enum>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.Enum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.Enum>
|
||||
}
|
||||
|
||||
public enum entry A : test.Enum {
|
||||
private constructor A()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
@@ -58,4 +52,8 @@ public final enum class Enum : kotlin.Enum<test.Enum> {
|
||||
public/*package*/ open fun foo(): kotlin.Unit
|
||||
public/*package*/ open fun values(): kotlin.Unit
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.Enum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.Enum>
|
||||
}
|
||||
|
||||
@@ -5,12 +5,6 @@ public final enum class StaticMembersInEnum : kotlin.Enum<test.StaticMembersInEn
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-StaticMembersInEnum> {
|
||||
private constructor <class-object-for-StaticMembersInEnum>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.StaticMembersInEnum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.StaticMembersInEnum>
|
||||
}
|
||||
|
||||
public enum entry ENTRY : test.StaticMembersInEnum {
|
||||
private constructor ENTRY()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
@@ -28,5 +22,7 @@ public final enum class StaticMembersInEnum : kotlin.Enum<test.StaticMembersInEn
|
||||
public final var STATIC_FIELD: kotlin.Int
|
||||
public open fun foo(): kotlin.Unit
|
||||
public open fun valueOf(/*0*/ p0: kotlin.Int): kotlin.Unit
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.StaticMembersInEnum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.StaticMembersInEnum>
|
||||
public open fun values(/*0*/ p0: kotlin.Int): kotlin.Unit
|
||||
}
|
||||
|
||||
+3
-5
@@ -17,9 +17,7 @@ internal final enum class E : kotlin.Enum<test.E> {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-E> {
|
||||
/*primary*/ private constructor <class-object-for-E>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.E>
|
||||
}
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.E>
|
||||
}
|
||||
|
||||
+3
-5
@@ -5,9 +5,7 @@ internal final enum class EnumWithGenericConstructorParameter : kotlin.Enum<test
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-EnumWithGenericConstructorParameter> {
|
||||
/*primary*/ private constructor <class-object-for-EnumWithGenericConstructorParameter>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.EnumWithGenericConstructorParameter
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.EnumWithGenericConstructorParameter>
|
||||
}
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.EnumWithGenericConstructorParameter
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.EnumWithGenericConstructorParameter>
|
||||
}
|
||||
|
||||
+3
-5
@@ -5,9 +5,7 @@ internal final enum class EnumWithPrimitiveConstructorParameter : kotlin.Enum<te
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-EnumWithPrimitiveConstructorParameter> {
|
||||
/*primary*/ private constructor <class-object-for-EnumWithPrimitiveConstructorParameter>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.EnumWithPrimitiveConstructorParameter
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.EnumWithPrimitiveConstructorParameter>
|
||||
}
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.EnumWithPrimitiveConstructorParameter
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.EnumWithPrimitiveConstructorParameter>
|
||||
}
|
||||
|
||||
@@ -5,12 +5,6 @@ internal final enum class In : kotlin.Enum<test.In> {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-In> {
|
||||
/*primary*/ private constructor <class-object-for-In>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.In
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.In>
|
||||
}
|
||||
|
||||
public enum entry A : test.In {
|
||||
/*primary*/ private constructor A()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
@@ -22,6 +16,10 @@ internal final enum class In : kotlin.Enum<test.In> {
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.In
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.In>
|
||||
}
|
||||
|
||||
private final enum class Pr : kotlin.Enum<test.Pr> {
|
||||
@@ -29,12 +27,6 @@ private final enum class Pr : kotlin.Enum<test.Pr> {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-Pr> {
|
||||
/*primary*/ private constructor <class-object-for-Pr>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.Pr
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.Pr>
|
||||
}
|
||||
|
||||
public enum entry A : test.Pr {
|
||||
/*primary*/ private constructor A()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
@@ -46,6 +38,10 @@ private final enum class Pr : kotlin.Enum<test.Pr> {
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.Pr
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.Pr>
|
||||
}
|
||||
|
||||
public final enum class Pu : kotlin.Enum<test.Pu> {
|
||||
@@ -53,12 +49,6 @@ public final enum class Pu : kotlin.Enum<test.Pu> {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-Pu> {
|
||||
/*primary*/ private constructor <class-object-for-Pu>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.Pu
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.Pu>
|
||||
}
|
||||
|
||||
public enum entry A : test.Pu {
|
||||
/*primary*/ private constructor A()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
@@ -70,4 +60,8 @@ public final enum class Pu : kotlin.Enum<test.Pu> {
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.Pu
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.Pu>
|
||||
}
|
||||
|
||||
@@ -9,12 +9,6 @@ internal final enum class En : kotlin.Enum<test.En> {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-En> {
|
||||
/*primary*/ private constructor <class-object-for-En>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.En
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.En>
|
||||
}
|
||||
|
||||
public enum entry E1 : test.En {
|
||||
/*primary*/ private constructor E1()
|
||||
internal final override /*1*/ /*fake_override*/ val b: kotlin.Boolean
|
||||
@@ -74,4 +68,8 @@ internal final enum class En : kotlin.Enum<test.En> {
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.En
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.En>
|
||||
}
|
||||
|
||||
@@ -8,12 +8,6 @@ internal final class A {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-E> {
|
||||
/*primary*/ private constructor <class-object-for-E>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.A.E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.A.E>
|
||||
}
|
||||
|
||||
public enum entry ENTRY : test.A.E {
|
||||
/*primary*/ private constructor ENTRY()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
@@ -25,5 +19,9 @@ internal final class A {
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.A.E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.A.E>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,12 +12,6 @@ internal final class A {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-E> {
|
||||
/*primary*/ private constructor <class-object-for-E>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.A.E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.A.E>
|
||||
}
|
||||
|
||||
public enum entry ENTRY : test.A.E {
|
||||
/*primary*/ private constructor ENTRY()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
@@ -29,5 +23,9 @@ internal final class A {
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.A.E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.A.E>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,6 @@ internal final enum class MyEnum : kotlin.Enum<test.MyEnum> {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-MyEnum> {
|
||||
/*primary*/ private constructor <class-object-for-MyEnum>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.MyEnum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.MyEnum>
|
||||
}
|
||||
|
||||
public enum entry ENTRY : test.MyEnum {
|
||||
/*primary*/ private constructor ENTRY()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
@@ -22,4 +16,8 @@ internal final enum class MyEnum : kotlin.Enum<test.MyEnum> {
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.MyEnum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.MyEnum>
|
||||
}
|
||||
|
||||
@@ -5,12 +5,6 @@ internal final enum class Test : kotlin.Enum<test.Test> {
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-Test> {
|
||||
/*primary*/ private constructor <class-object-for-Test>()
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.Test
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.Test>
|
||||
}
|
||||
|
||||
public enum entry A : test.Test {
|
||||
/*primary*/ private constructor A()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
@@ -34,4 +28,8 @@ internal final enum class Test : kotlin.Enum<test.Test> {
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.Test
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.Test>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user