mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed false destructuring error
This commit is contained in:
parent
dd6e7f0c2a
commit
45edfc8604
3 changed files with 19 additions and 22 deletions
|
@ -3608,11 +3608,11 @@ void BfExprEvaluator::Visit(BfCaseExpression* caseExpr)
|
|||
auto dscrType = caseValAddr.mType->ToTypeInstance()->GetDiscriminatorType(&dscrDataIdx);
|
||||
auto enumTagVal = mModule->LoadValue(mModule->ExtractValue(caseValAddr, NULL, 2));
|
||||
int uncondTagId = -1;
|
||||
mResult = mModule->TryCaseEnumMatch(caseValAddr, enumTagVal, caseExpr->mCaseExpression, NULL, NULL, NULL, uncondTagId, hadConditional, clearOutOnMismatch);
|
||||
mResult = mModule->TryCaseEnumMatch(caseValAddr, enumTagVal, caseExpr->mCaseExpression, NULL, NULL, NULL, uncondTagId, hadConditional, clearOutOnMismatch, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
mResult = mModule->TryCaseTupleMatch(caseValAddr, tupleExpr, NULL, NULL, NULL, hadConditional, clearOutOnMismatch);
|
||||
mResult = mModule->TryCaseTupleMatch(caseValAddr, tupleExpr, NULL, NULL, NULL, hadConditional, clearOutOnMismatch, false);
|
||||
}
|
||||
|
||||
if (mResult)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue