1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Fixed enum issues utilizing Underlying in initializer

This commit is contained in:
Brian Fiete 2025-02-15 10:12:27 -08:00
parent f7b3f88868
commit fa251b3439
3 changed files with 28 additions and 2 deletions

View file

@ -22357,7 +22357,7 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup,
BfIRValue fromBool;
mBfIRBuilder->RestoreDebugLocation();
if (!mCompiler->mIsResolveOnly)
if ((!mCompiler->mIsResolveOnly) || (mIsComptimeModule))
{
if (!mCurTypeInstance->IsValuelessType())
ret = mBfIRBuilder->CreateRet(GetThis().mValue);

View file

@ -3590,7 +3590,13 @@ void BfModule::DoPopulateType_InitSearches(BfTypeInstance* typeInstance)
}
void BfModule::DoPopulateType_FinishEnum(BfTypeInstance* typeInstance, bool underlyingTypeDeferred, HashContext* dataMemberHashCtx, BfType* unionInnerType)
{
{
if (typeInstance->mDefineState >= BfTypeDefineState_DefinedAndMethodsSlotting)
{
// Already locked
return;
}
if (typeInstance->IsEnum())
{
int64 min = 0;