cvs: ZendEngine2 / zend_compile.c

From: Date: Thu, 03 Jul 2003 16:45:35 +0000
Subject: cvs: ZendEngine2 / zend_compile.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1454@lists.php.net to get a copy of this message
helly Thu Jul 3 12:45:35 2003 EDT Modified files: /ZendEngine2 zend_compile.c Log: Allow final private methods # # Declaring a method private and final would only be an error for an abstract # class. But at the moment the method is defined and it's modifiers are checked # we do not know whether or not we have an abstract class. It could already be # abstract but it also become abstract later. # # Since i made the mistake in first place i remove the check now. # # Providing the correct test would slow down the compiler becuase we'd have to # iterate through all methods on all abstract classes and check for this. I # guess we can live without. Or does anybody wants this to be implemented ? Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.433 ZendEngine2/zend_compile.c:1.434 --- ZendEngine2/zend_compile.c:1.433 Thu Jul 3 08:03:11 2003 +++ ZendEngine2/zend_compile.c Thu Jul 3 12:45:35 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.433 2003/07/03 12:03:11 stas Exp $ */ +/* $Id: zend_compile.c,v 1.434 2003/07/03 16:45:35 helly Exp $ */ #include "zend_language_parser.h" #include "zend.h" @@ -965,9 +965,6 @@ } if (((current_access_type->u.constant.value.lval | new_modifier->u.constant.value.lval) & (ZEND_ACC_ABSTRACT | ZEND_ACC_FINAL)) == (ZEND_ACC_ABSTRACT | ZEND_ACC_FINAL)) { zend_error(E_COMPILE_ERROR, "Cannot use the final modifier on an abstract class member"); - } - if (((current_access_type->u.constant.value.lval | new_modifier->u.constant.value.lval) & (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL)) == (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL)) { - zend_error(E_COMPILE_ERROR, "Cannot use the final modifier on a private class member"); } return (current_access_type->u.constant.value.lval | new_modifier->u.constant.value.lval); }

« previous php.zend-engine.cvs (#1454) next »