Assume private visibility for all class members by default.
All checks were successful
The build was successful.

In most (all?) modern OOP languages class members visibility is assumed to be private and programmer has to consciously set it to public or protected. PHP has the different approach what can cause a security flaws in written scripts. AerScript will not follow this way, as it seems to be conceptually broken.
This commit is contained in:
2019-05-17 08:40:41 +02:00
parent 48ccd7fef0
commit 55acf8111f
41 changed files with 72 additions and 84 deletions

View File

@@ -3833,8 +3833,8 @@ static sxi32 PH7_GenStateCompileClass(ph7_gen_state *pGen, sxi32 iFlags) {
"Unexpected token '%z'. Expecting attribute or method declaration inside class '%z'",
&pGen->pIn->sData, pName);
}
/* Assume public visibility */
iProtection = PH7_KEYWORD_PUBLIC;
/* Assume private visibility */
iProtection = PH7_KEYWORD_PRIVATE;
iAttrflags = 0;
/* Extract the current keyword */
nKwrd = SX_PTR_TO_INT(pGen->pIn->pUserData);