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

Tuple deferred assignment fix with casted ref values

This commit is contained in:
Brian Fiete 2022-01-03 07:43:06 -05:00
parent 1ee0a19bbf
commit f1c38c792d

View file

@ -2415,7 +2415,9 @@ void BfModule::HandleCaseEnumMatch_Tuple(BfTypedValue tupleVal, const BfSizedArr
auto tupleElement = Cast(deferredAssign.mExpr, deferredAssign.mTupleElement, argValue.mType);
if (!tupleElement)
continue;
mBfIRBuilder->CreateStore(tupleElement.mValue, argValue.mValue);
tupleElement = LoadValue(tupleElement);
if (!tupleElement.mType->IsValuelessType())
mBfIRBuilder->CreateStore(tupleElement.mValue, argValue.mValue);
}
if ((clearOutOnMismatch) && (!deferredAssigns.IsEmpty()))