EnumConstructorCall.fromSymbolDescriptor
(cherry picked from commit 97f1bfae30e80d0a73cd691a1de71a3bd5032028)
This commit is contained in:
committed by
Vasily Levchenko
parent
38fbb7480a
commit
c5ff865529
+2
-2
@@ -120,7 +120,7 @@ internal class CEnumClassGenerator(
|
|||||||
SYNTHETIC_OFFSET, SYNTHETIC_OFFSET,
|
SYNTHETIC_OFFSET, SYNTHETIC_OFFSET,
|
||||||
IrDeclarationOrigin.IR_EXTERNAL_DECLARATION_STUB, entryDescriptor
|
IrDeclarationOrigin.IR_EXTERNAL_DECLARATION_STUB, entryDescriptor
|
||||||
).also { enumEntry ->
|
).also { enumEntry ->
|
||||||
enumEntry.initializerExpression = IrExpressionBodyImpl(IrEnumConstructorCallImpl(
|
enumEntry.initializerExpression = IrExpressionBodyImpl(IrEnumConstructorCallImpl.fromSymbolDescriptor(
|
||||||
SYNTHETIC_OFFSET, SYNTHETIC_OFFSET,
|
SYNTHETIC_OFFSET, SYNTHETIC_OFFSET,
|
||||||
type = irBuiltIns.unitType,
|
type = irBuiltIns.unitType,
|
||||||
symbol = symbolTable.referenceConstructor(enumDescriptor.unsubstitutedPrimaryConstructor!!),
|
symbol = symbolTable.referenceConstructor(enumDescriptor.unsubstitutedPrimaryConstructor!!),
|
||||||
@@ -147,7 +147,7 @@ internal class CEnumClassGenerator(
|
|||||||
val irConstructor = createConstructor(descriptor.unsubstitutedPrimaryConstructor!!)
|
val irConstructor = createConstructor(descriptor.unsubstitutedPrimaryConstructor!!)
|
||||||
val enumConstructor = context.builtIns.enum.constructors.single()
|
val enumConstructor = context.builtIns.enum.constructors.single()
|
||||||
irConstructor.body = irBuilder(irBuiltIns, irConstructor.symbol, SYNTHETIC_OFFSET, SYNTHETIC_OFFSET).irBlockBody {
|
irConstructor.body = irBuilder(irBuiltIns, irConstructor.symbol, SYNTHETIC_OFFSET, SYNTHETIC_OFFSET).irBlockBody {
|
||||||
+IrEnumConstructorCallImpl(
|
+IrEnumConstructorCallImpl.fromSymbolDescriptor(
|
||||||
startOffset, endOffset,
|
startOffset, endOffset,
|
||||||
context.irBuiltIns.unitType,
|
context.irBuiltIns.unitType,
|
||||||
symbolTable.referenceConstructor(enumConstructor),
|
symbolTable.referenceConstructor(enumConstructor),
|
||||||
|
|||||||
Reference in New Issue
Block a user