Browse Source

Correctly identify a member.

release/v0.1
Rafal Kupiec 1 year ago
parent
commit
4cc7940216
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      engine/oop.c

+ 2
- 1
engine/oop.c View File

@ -254,7 +254,8 @@ PH7_PRIVATE sxi32 PH7_ClassInherit(ph7_vm *pVm, ph7_class *pSub, ph7_class *pBas
pAttr = (ph7_class_attr *)pEntry->pUserData;
pName = &pAttr->sName;
if((pEntry = SyHashGet(&pSub->hAttr, (const void *)pName->zString, pName->nByte)) != 0) {
PH7_VmThrowError(pVm, PH7_CTX_WARNING, "Attribute '%z::$%z' hides inherited member '%z::$%z'", &pSub->sName, pName, &pBase->sName, pName);
ph7_class_attr *pSubAttr = (ph7_class_attr *)pEntry->pUserData;
PH7_VmThrowError(pVm, PH7_CTX_WARNING, "Attribute '%z::$%z' hides inherited member '%z::$%z'", &pSubAttr->pClass->sName, pName, &pBase->sName, pName);
}
/* Install the attribute */
rc = SyHashInsert(&pSub->hAttr, (const void *)pName->zString, pName->nByte, pAttr);

Loading…
Cancel
Save