Do not store ClassDescriptor in EnumValue
Only store the ClassId of the enum class and the Name of the entry, and resolve the needed descriptor in getType() instead, which now takes the module instance where that descriptor should be resolved
This commit is contained in:
@@ -197,7 +197,7 @@ private constructor(private val whenExpression: KtWhenExpression, context: Trans
|
||||
): Pair<List<EntryWithConstants>, Int> {
|
||||
return collectConstantEntries(
|
||||
fromIndex, entries,
|
||||
{ (it.toConstantValue(expectedType) as? EnumValue)?.value?.name?.identifier },
|
||||
{ (it.toConstantValue(expectedType) as? EnumValue)?.enumEntryName?.identifier },
|
||||
{ uniqueEnumNames.add(it) },
|
||||
{ JsStringLiteral(it) }
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user