Implement cooperative parent calls across runtime C3 MRO and enforce lifecycle method rules
Build / AerScript (push) Successful in 41s
Build / AerScript (push) Successful in 41s
This commit is contained in:
@@ -3437,6 +3437,12 @@ static sxi32 PH7_GenStateCompileClassMethod(
|
||||
/* Peek method name */
|
||||
pName = &pGen->pIn->sData;
|
||||
nLine = pGen->pIn->nLine;
|
||||
if(((pName->nByte == sizeof("__construct") - 1 &&
|
||||
SyMemcmp(pName->zString, "__construct", sizeof("__construct") - 1) == 0) ||
|
||||
(pName->nByte == sizeof("__destruct") - 1 &&
|
||||
SyMemcmp(pName->zString, "__destruct", sizeof("__destruct") - 1) == 0)) && nType != MEMOBJ_VOID) {
|
||||
PH7_GenCompileError(pGen, E_ERROR, nLine, "Method '%z::%z()' must return void", &pClass->sName, pName);
|
||||
}
|
||||
/* Jump the method name */
|
||||
pGen->pIn++;
|
||||
if(iFlags & PH7_CLASS_ATTR_VIRTUAL) {
|
||||
|
||||
Reference in New Issue
Block a user