Attempt to fix methods visibility mechanism.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-05-29 08:17:10 +02:00
parent 1f5afc9d51
commit 4d1c246a65
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 2 additions and 2 deletions

View File

@ -4193,9 +4193,9 @@ static sxi32 VmByteCodeExec(
&pClass->sName, &sName &pClass->sName, &sName
); );
} else { } else {
if(pMeth->iProtection == PH7_CLASS_PROT_PRIVATE && (pNos->iFlags == MEMOBJ_BASEOBJ || pNos->iFlags == MEMOBJ_PARENTOBJ)) { if(!VmClassMemberAccess(&(*pVm), pMeth->sFunc.pClass, &sName, pMeth->iProtection, FALSE)) {
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, PH7_VmThrowError(&(*pVm), PH7_CTX_ERR,
"Access to the class method '%z->%z()' is forbidden", &pClass->sName, &sName); "Access to the class method '%z->%z()' is forbidden", &pMeth->sFunc.pClass->sName, &sName);
} }
/* Push method name on the stack */ /* Push method name on the stack */
PH7_MemObjRelease(pTos); PH7_MemObjRelease(pTos);