Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_compile.c zend_compile.h zend_language_parser.y zend_language_scanner.l

From: Date: Mon, 24 Feb 2003 19:36:02 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_compile.c zend_compile.h zend_language_parser.y zend_language_scanner.l
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-967@lists.php.net to get a copy of this message
At 13:05 24.02.2003, Zeev Suraski wrote:
zeev            Mon Feb 24 07:05:59 2003 EDT
Add 'final'
Patch for the error messages: Index: Zend/zend_compile.c =================================================================== RCS file: /repository/ZendEngine2/zend_compile.c,v retrieving revision 1.374 diff -u -r1.374 zend_compile.c
--- Zend/zend_compile.c 24 Feb 2003 13:35:47 -0000      1.374
+++ Zend/zend_compile.c 24 Feb 2003 19:30:31 -0000 @@ -916,8 +916,8 @@
                && ((current_access_type->u.constant.value.lval & ZEND_ACC_PPP_MASK) != (new_modifier->u.constant.value.lval & ZEND_ACC_PPP_MASK))) {
                zend_error(E_COMPILE_ERROR, "Multiple access type modifiers are not allowed");
        }
-       if ((current_access_type->u.constant.value.lval | new_modifier->u.constant.value.lval) && (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL)) {
-               zend_error(E_COMPILE_ERROR, "Cannot use the final modifier on a private class member");
+       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");
        }
        return (current_access_type->u.constant.value.lval | new_modifier->u.constant.value.lval);
} @@ -1607,7 +1607,7 @@
        }
        if (parent_flags & ZEND_ACC_FINAL) {
-               zend_error(E_COMPILE_ERROR, "Cannot override final method %s::%s()", ZEND_FN_SCOPE_NAME(parent), child->common.function_name);
+               zend_error(E_COMPILE_ERROR, "Cannot override final method %s::%s() in class %s", ZEND_FN_SCOPE_NAME(parent), child->common.function_name, ZEND_FN_SCOPE_NAME(child));
        }
        child_flags     = child->common.fn_flags;
regards marcus

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