mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +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))
|
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))
|
if ((lambdaBindExpr->mNewToken != NULL) && (isFunctionBind))
|
||||||
mModule->Fail("Binds to functions should do not require allocations.", lambdaBindExpr->mNewToken);
|
mModule->Fail("Binds to functions should do not require allocations.", lambdaBindExpr->mNewToken);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue