This commit is contained in:
+4
-2
@@ -3904,8 +3904,10 @@ static sxi32 PH7_CompileClassInterface(ph7_gen_state *pGen) {
|
|||||||
/* Extract the current keyword */
|
/* Extract the current keyword */
|
||||||
nKwrd = SX_PTR_TO_INT(pGen->pIn->pUserData);
|
nKwrd = SX_PTR_TO_INT(pGen->pIn->pUserData);
|
||||||
if(nKwrd == PH7_KEYWORD_PRIVATE || nKwrd == PH7_KEYWORD_PROTECTED) {
|
if(nKwrd == PH7_KEYWORD_PRIVATE || nKwrd == PH7_KEYWORD_PROTECTED) {
|
||||||
/* Emit a warning and switch to public visibility */
|
/* Preserve constant visibility recovery; non-public methods are fatal. */
|
||||||
PH7_GenCompileError(&(*pGen), E_WARNING, pGen->pIn->nLine, "interface: Access type must be public");
|
PH7_GenCompileError(&(*pGen),
|
||||||
|
pGen->pIn + 1 < pGen->pEnd && SX_PTR_TO_INT(pGen->pIn[1].pUserData) == PH7_KEYWORD_CONST ? E_WARNING : E_ERROR,
|
||||||
|
pGen->pIn->nLine, "interface: Access type must be public");
|
||||||
nKwrd = PH7_KEYWORD_PUBLIC;
|
nKwrd = PH7_KEYWORD_PUBLIC;
|
||||||
}
|
}
|
||||||
if(nKwrd == PH7_KEYWORD_PUBLIC) {
|
if(nKwrd == PH7_KEYWORD_PUBLIC) {
|
||||||
|
|||||||
Reference in New Issue
Block a user