Do not install private methods from parent to subclass.
Všechny kontroly byly úspěšné
The build was successful.
Všechny kontroly byly úspěšné
The build was successful.
All methods defined in superclass can be access by $this and $parent construct. There is no need to copy private methods, as they cannot be access in $this context.
Tento commit je obsažen v:
@@ -282,9 +282,11 @@ PH7_PRIVATE sxi32 PH7_ClassInherit(ph7_vm *pVm, ph7_class *pSub, ph7_class *pBas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Install the method */
|
/* Install the method */
|
||||||
rc = SyHashInsert(&pSub->hMethod, (const void *)pName->zString, pName->nByte, pMeth);
|
if(pMeth->iProtection != PH7_CLASS_PROT_PRIVATE) {
|
||||||
if(rc != SXRET_OK) {
|
rc = SyHashInsert(&pSub->hMethod, (const void *)pName->zString, pName->nByte, pMeth);
|
||||||
return rc;
|
if(rc != SXRET_OK) {
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Mark first inherited class as direct subclass */
|
/* Mark first inherited class as direct subclass */
|
||||||
|
|||||||
Odkázat v novém úkolu
Zablokovat Uživatele