Strictly check for data type of static variable declaration.
Some checks reported errors
The build has failed.
Some checks reported errors
The build has failed.
This commit is contained in:
@@ -4949,6 +4949,10 @@ static sxi32 VmByteCodeExec(
|
||||
/* Evaluate initialization expression (Any complex expression) */
|
||||
VmLocalExec(&(*pVm), &pStatic->aByteCode, pObj);
|
||||
}
|
||||
if(pObj->iFlags != pStatic->iFlags) {
|
||||
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR,
|
||||
"Value does not match the data type of '$%z' variable", &pStatic->sName);
|
||||
}
|
||||
pObj->nIdx = pStatic->nIdx;
|
||||
} else {
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user