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
|
@ -9508,8 +9508,14 @@ BfTypedValue BfExprEvaluator::CheckEnumCreation(BfAstNode* targetSrc, BfTypeInst
|
|||
|
||||
BfTypedValue receivingValue;
|
||||
BfIRValue tupleFieldPtr;
|
||||
if (tuplePtr)
|
||||
|
||||
mModule->PopulateType(tupleFieldInstance->mResolvedType);
|
||||
if (tupleFieldInstance->mResolvedType->IsValuelessType())
|
||||
{
|
||||
receivingValue = mModule->GetDefaultTypedValue(tupleFieldInstance->mResolvedType);
|
||||
}
|
||||
else if (tuplePtr)
|
||||
{
|
||||
tupleFieldPtr = mModule->mBfIRBuilder->CreateInBoundsGEP(tuplePtr, 0, tupleFieldInstance->mDataIdx);
|
||||
receivingValue = BfTypedValue(tupleFieldPtr, tupleFieldInstance->mResolvedType, true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue