From af0cd194db48751fcdc3c1f718ad57a9939d05d0 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Fri, 31 Dec 2021 12:44:33 -0500 Subject: [PATCH] Ignore errors during VisitLambdaBodies capture for methodRef --- IDEHelper/Compiler/BfExprEvaluator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/IDEHelper/Compiler/BfExprEvaluator.cpp b/IDEHelper/Compiler/BfExprEvaluator.cpp index 1faa05e4..47cbc8f4 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -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 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);