Implement explicit value and reference captures for closures
Build / AerScript (push) Successful in 40s

This commit is contained in:
2026-10-26 00:05:05 +01:00
parent 85f59a2998
commit 4fe0f4dcd9
4 changed files with 219 additions and 32 deletions
-3
View File
@@ -3235,9 +3235,6 @@ static sxi32 PH7_GenStateCompileFunc(
nLine = pGen->pIn->nLine;
if(pGen->pIn->nType & PH7_TK_AMPER) {
/* Pass by reference,record that */
PH7_GenCompileError(pGen, E_WARNING, nLine,
"Closure: Pass by reference is disabled in the current release of the PH7 engine,PH7 is switching to pass by value"
);
iFlags = VM_FUNC_ARG_BY_REF;
pGen->pIn++;
}