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

Ignore errors during VisitLambdaBodies capture for methodRef

This commit is contained in:
Brian Fiete 2021-12-31 12:44:33 -05:00
parent 38abaf6b3f
commit af0cd194db

View file

@ -12505,7 +12505,10 @@ BfLambdaInstance* BfExprEvaluator::GetLambdaInstance(BfLambdaBindExpression* lam
else if ((lambdaBindExpr->mNewToken == NULL) || (isFunctionBind))
{
if ((mModule->mCurMethodState != NULL) && (mModule->mCurMethodState->mClosureState != NULL) && (mModule->mCurMethodState->mClosureState->mCapturing))
{
SetAndRestoreValue<bool> prevIgnoreErrors(mModule->mIgnoreErrors, true);
VisitLambdaBodies(lambdaBindExpr->mBody, lambdaBindExpr->mDtor);
}
if ((lambdaBindExpr->mNewToken != NULL) && (isFunctionBind))
mModule->Fail("Binds to functions should do not require allocations.", lambdaBindExpr->mNewToken);