JVM: support enumEntries intrinsic for Kotlin enums

Implementation is very similar to the `enumValues` intrinsic.

Java enums and old (pre-1.9) Kotlin enums will be supported in a
subsequent commit.

 #KT-59710
This commit is contained in:
Alexander Udalov
2023-07-19 16:08:36 +02:00
committed by Space Team
parent c94c5a7d58
commit 874d1c514a
36 changed files with 652 additions and 4 deletions
@@ -90,6 +90,8 @@ public class AsmTypes {
public static final Type DEFAULT_CONSTRUCTOR_MARKER = Type.getObjectType("kotlin/jvm/internal/DefaultConstructorMarker");
public static final Type ENUM_ENTRIES = Type.getObjectType("kotlin/enums/EnumEntries");
@NotNull
private static Type reflect(@NotNull String className) {
return Type.getObjectType("kotlin/reflect/" + className);