Typehinting merge #50

Merged
belliash merged 298 commits from typehinting into master 2019-04-17 11:27:52 +02:00
Showing only changes of commit 5504579566 - Show all commits

View File

@ -4964,9 +4964,9 @@ static sxi32 VmByteCodeExec(
if(pClass) { if(pClass) {
if((pArg->iFlags & MEMOBJ_OBJ) == 0) { if((pArg->iFlags & MEMOBJ_OBJ) == 0) {
if((pArg->iFlags & MEMOBJ_NULL) == 0) { if((pArg->iFlags & MEMOBJ_NULL) == 0) {
PH7_VmThrowError(&(*pVm), PH7_CTX_WARNING, PH7_VmThrowError(&(*pVm), PH7_CTX_ERR,
"Function '%z()':Argument %u must be an object of type '%z', PH7 is loading NULL instead", "Argument %u passed to function '%z()' must be an object of type '%z'",
&pVmFunc->sName, n + 1, pName); n+1, &pVmFunc->sName, pName);
PH7_MemObjRelease(pArg); PH7_MemObjRelease(pArg);
} }
} else { } else {
@ -4974,8 +4974,8 @@ static sxi32 VmByteCodeExec(
/* 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_WARNING,
"Function '%z()':Argument %u must be an object of type '%z', PH7 is loading NULL instead", "Argument %u passed to function '%z()' must be an object of type '%z'",
&pVmFunc->sName, n + 1, pName); n+1, &pVmFunc->sName, pName);
PH7_MemObjRelease(pArg); PH7_MemObjRelease(pArg);
} }
} }