Browse Source

Call to undefined constant should lead to an error.

release/v0.1
Rafal Kupiec 1 year ago
parent
commit
62c315da9e
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      engine/vm.c

+ 3
- 0
engine/vm.c View File

@ -2450,6 +2450,9 @@ static sxi32 VmByteCodeExec(
/* Mark as constant */
pTos->nIdx = SXU32_HIGH;
break;
} else if(pInstr[1].iOp != PH7_OP_MEMBER && pInstr[1].iOp != PH7_OP_NEW && pInstr[2].iOp != PH7_OP_MEMBER && pInstr[1].iOp != PH7_OP_NEW) {
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR,
"Call to undefined constant ‘%s’", SyBlobData(&pObj->sBlob));
}
}
PH7_MemObjLoad(pObj, pTos);

Loading…
Cancel
Save