Call to undefined constant should lead to an error.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-04-28 21:44:48 +02:00
parent 10516fb655
commit 62c315da9e
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 3 additions and 0 deletions

View File

@ -2450,6 +2450,9 @@ static sxi32 VmByteCodeExec(
/* Mark as constant */ /* Mark as constant */
pTos->nIdx = SXU32_HIGH; pTos->nIdx = SXU32_HIGH;
break; 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); PH7_MemObjLoad(pObj, pTos);