mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Properly VisitLambdaBodies during inner methodRef capture
This commit is contained in:
parent
1201289f78
commit
eae4aed3a9
1 changed files with 3 additions and 0 deletions
|
@ -12504,6 +12504,9 @@ BfLambdaInstance* BfExprEvaluator::GetLambdaInstance(BfLambdaBindExpression* lam
|
|||
}
|
||||
else if ((lambdaBindExpr->mNewToken == NULL) || (isFunctionBind))
|
||||
{
|
||||
if ((mModule->mCurMethodState != NULL) && (mModule->mCurMethodState->mClosureState != NULL) && (mModule->mCurMethodState->mClosureState->mCapturing))
|
||||
VisitLambdaBodies(lambdaBindExpr->mBody, lambdaBindExpr->mDtor);
|
||||
|
||||
if ((lambdaBindExpr->mNewToken != NULL) && (isFunctionBind))
|
||||
mModule->Fail("Binds to functions should do not require allocations.", lambdaBindExpr->mNewToken);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue