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

Fixed invalid clearing of mIsCapturingMethodMatchInfo with inner call

This commit is contained in:
Brian Fiete 2022-01-05 08:30:03 -05:00
parent e4510fdb3a
commit 3fd7e31119

View file

@ -6607,12 +6607,19 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
AddCallDependencies(methodInstance);
bool wasCapturingMatchInfo = false;
auto autoComplete = GetAutoComplete();
if (autoComplete != NULL)
{
// Set to false to make sure we don't capture method match info from 'params' array creation
wasCapturingMatchInfo = autoComplete->mIsCapturingMethodMatchInfo;
autoComplete->mIsCapturingMethodMatchInfo = false;
}
defer(
{
if (autoComplete != NULL)
autoComplete->mIsCapturingMethodMatchInfo = wasCapturingMatchInfo;
});
BfScopeData* boxScopeData = mDeferScopeAlloc;
if ((boxScopeData == NULL) && (mModule->mCurMethodState != NULL))