mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Improved issues with enums with code emissions
This commit is contained in:
parent
2a8a68e5d1
commit
35271626aa
3 changed files with 19 additions and 6 deletions
|
@ -9117,7 +9117,7 @@ BfTypedValue BfExprEvaluator::CheckEnumCreation(BfAstNode* targetSrc, BfTypeInst
|
|||
|
||||
if (wantConst)
|
||||
{
|
||||
NOP;
|
||||
//
|
||||
}
|
||||
else if ((mReceivingValue != NULL) && (mReceivingValue->mType == enumType) && (mReceivingValue->IsAddr()))
|
||||
{
|
||||
|
@ -9136,6 +9136,12 @@ BfTypedValue BfExprEvaluator::CheckEnumCreation(BfAstNode* targetSrc, BfTypeInst
|
|||
auto tupleType = (BfTypeInstance*)fieldInstance->mResolvedType;
|
||||
mModule->mBfIRBuilder->PopulateType(tupleType);
|
||||
|
||||
if (tupleType->IsDeleting())
|
||||
{
|
||||
mModule->FailInternal("Deleted tuple type found in CheckEnumCreation", targetSrc);
|
||||
return BfTypedValue();
|
||||
}
|
||||
|
||||
bool constFailed = false;
|
||||
SizedArray<BfIRValue, 8> constTupleMembers;
|
||||
BfIRValue fieldPtr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue