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

Allow Compiler.Emit during lambda capture phase

This commit is contained in:
Brian Fiete 2022-04-18 10:42:08 -07:00
parent 1a93660416
commit a30e539d29
8 changed files with 82 additions and 55 deletions

View file

@ -6036,7 +6036,12 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, BfMethodInstance*
if ((mModule->mCurMethodState != NULL) && (mModule->mCurMethodState->mClosureState != NULL) && (mModule->mCurMethodState->mClosureState->mCapturing))
{
return _GetDefaultReturnValue();
if ((methodInstance->mComptimeFlags & BfComptimeFlag_ConstEval) != 0)
{
// We need to perform call such as Compiler.Mixin and String.ConstF
}
else
return _GetDefaultReturnValue();
}
BF_ASSERT(!methodInstance->mDisallowCalling);