1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Adds payload enum payload descriminator value to reflection info

This commit is contained in:
Brian Fiete 2024-02-27 10:58:48 -05:00
parent 3ea36817ff
commit df807dc275

View file

@ -5838,7 +5838,12 @@ BfIRValue BfModule::CreateFieldData(BfFieldInstance* fieldInstance, int customAt
BfIRValue constValue; BfIRValue constValue;
BfIRValue constValue2; BfIRValue constValue2;
if (fieldInstance->GetFieldDef()->mIsConst) if (fieldInstance->mIsEnumPayloadCase)
{
int tagId = -fieldInstance->mDataIdx - 1;
constValue = mBfIRBuilder->CreateConst(BfTypeCode_IntPtr, tagId);
}
else if (fieldInstance->GetFieldDef()->mIsConst)
{ {
if (fieldInstance->mConstIdx != -1) if (fieldInstance->mConstIdx != -1)
{ {