1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Improved mid-compile deleted type handling

This commit is contained in:
Brian Fiete 2025-02-23 08:08:13 -08:00
parent 188ff74128
commit 4ba8f6b0f6
5 changed files with 39 additions and 5 deletions

View file

@ -2947,6 +2947,13 @@ BfTypedValue BfModule::TryCaseEnumMatch(BfTypedValue enumVal, BfTypedValue tagVa
PopulateType(tupleType);
mBfIRBuilder->PopulateType(tupleType);
if (tupleType->IsDeleting())
{
mCompiler->RequestExtraCompile();
InternalError("TryCaseEnumMatch using deleted type", expr);
return BfTypedValue();
}
auto boolType = GetPrimitiveType(BfTypeCode_Boolean);
tagId = -fieldInstance->mDataIdx - 1;