JVM IR: Fix types in EnumClassLowering
This commit is contained in:
committed by
Alexander Udalov
parent
492a46206b
commit
9ef627ebec
+4
-3
@@ -490,7 +490,7 @@ private class EnumClassLowering(val context: JvmBackendContext) : ClassLoweringP
|
||||
IrReturnImpl(
|
||||
UNDEFINED_OFFSET,
|
||||
UNDEFINED_OFFSET,
|
||||
irClass.defaultType,
|
||||
context.irBuiltIns.nothingType,
|
||||
valueOfFunction.symbol,
|
||||
irValueOfCall
|
||||
)
|
||||
@@ -502,7 +502,8 @@ private class EnumClassLowering(val context: JvmBackendContext) : ClassLoweringP
|
||||
val cloneFun = context.irBuiltIns.arrayClass.owner.functions.find { it.name.asString() == "clone" }!!
|
||||
val returnType = valuesFunction.symbol.owner.returnType
|
||||
val irCloneValues =
|
||||
IrCallImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, returnType, cloneFun.symbol, 0).apply {
|
||||
IrCallImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, returnType, cloneFun.symbol, 1).apply {
|
||||
putTypeArgument(0, irClass.defaultType)
|
||||
dispatchReceiver =
|
||||
IrGetFieldImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, valuesField.symbol, valuesField.symbol.owner.type)
|
||||
}
|
||||
@@ -513,7 +514,7 @@ private class EnumClassLowering(val context: JvmBackendContext) : ClassLoweringP
|
||||
IrReturnImpl(
|
||||
UNDEFINED_OFFSET,
|
||||
UNDEFINED_OFFSET,
|
||||
returnType,
|
||||
context.irBuiltIns.nothingType,
|
||||
valuesFunction.symbol,
|
||||
irCloneValues
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user