Object of wrong type passed as argument should be generate error.
Visas pārbaudes ir veiksmīgas
The build was successful.
Visas pārbaudes ir veiksmīgas
The build was successful.
Šī revīzija ir iekļauta:
@@ -4975,7 +4975,7 @@ static sxi32 VmByteCodeExec(
|
|||||||
ph7_class_instance *pThis = (ph7_class_instance *)pArg->x.pOther;
|
ph7_class_instance *pThis = (ph7_class_instance *)pArg->x.pOther;
|
||||||
/* Make sure the object is an instance of the given class */
|
/* Make sure the object is an instance of the given class */
|
||||||
if(! VmInstanceOf(pThis->pClass, pClass)) {
|
if(! VmInstanceOf(pThis->pClass, pClass)) {
|
||||||
PH7_VmThrowError(&(*pVm), PH7_CTX_WARNING,
|
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR,
|
||||||
"Argument %u passed to function '%z()' must be an object of type '%z'",
|
"Argument %u passed to function '%z()' must be an object of type '%z'",
|
||||||
n+1, &pVmFunc->sName, pName);
|
n+1, &pVmFunc->sName, pName);
|
||||||
PH7_MemObjRelease(pArg);
|
PH7_MemObjRelease(pArg);
|
||||||
|
|||||||
Atsaukties uz šo jaunā problēmā
Block a user