Warn when non-void methods and closures finish without returning
Build / AerScript (push) Successful in 40s
Build / AerScript (push) Successful in 40s
This commit is contained in:
+2
-2
@@ -3133,8 +3133,8 @@ static sxi32 PH7_GenStateCompileFuncBody(
|
||||
PH7_CompileBlock(&(*pGen));
|
||||
/* Fix exception jumps now the destination is resolved */
|
||||
PH7_GenStateFixJumps(pGen->pCurrent, PH7_OP_THROW, PH7_VmInstrLength(pGen->pVm));
|
||||
/* Emit the final return if not yet done */
|
||||
PH7_VmEmitInstr(pGen->pVm, pGen->pIn->nLine, PH7_OP_DONE, 0, 0, 0, 0);
|
||||
/* Mark the implicit function epilogue, distinct from other DONE instructions. */
|
||||
PH7_VmEmitInstr(pGen->pVm, pGen->pIn->nLine, PH7_OP_DONE, 0, 1, 0, 0);
|
||||
/* Fix gotos jumps now the destination is resolved */
|
||||
if(SXERR_ABORT == GenStateFixGoto(&(*pGen), nGotoOfft)) {
|
||||
rc = SXERR_ABORT;
|
||||
|
||||
Reference in New Issue
Block a user