Several fixes to multiple inheritance
* Only first inherited class should be available via 'parent' keyword * If class X extends Y, Z and both Y and Z implements a(), $this->a() should match to the first one
Этот коммит содержится в:
родитель
deabbd5554
Коммит
8ab80ff8bc
@ -310,8 +310,11 @@ PH7_PRIVATE sxi32 PH7_ClassInherit(ph7_vm *pVm, ph7_class *pSub, ph7_class *pBas
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Mark as subclass */
|
||||
pSub->pBase = pBase;
|
||||
/* Mark first inherited class as direct subclass */
|
||||
ph7_class *pClass = pSub;
|
||||
if(!pSub->pBase) {
|
||||
pSub->pBase = pBase;
|
||||
}
|
||||
/* All done */
|
||||
return SXRET_OK;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user