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:
parent
188ff74128
commit
4ba8f6b0f6
5 changed files with 39 additions and 5 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue