cvs: ZendEngine2(PHP_5_0) / zend_compile.c
| From: | Marcus Boerger | Date: | Thu, 26 Aug 2004 23:02:55 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_0) / zend_compile.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2911@lists.php.net to get a copy of this message | ||
helly Thu Aug 26 19:02:55 2004 EDT
Modified files: (Branch: PHP_5_0)
/ZendEngine2 zend_compile.c
Log:
MFH: Enforce semantics: Classes cannot extend Interfaces
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.567.2.6&r2=1.567.2.7&ty=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.567.2.6 ZendEngine2/zend_compile.c:1.567.2.7
--- ZendEngine2/zend_compile.c:1.567.2.6 Thu Aug 26 18:43:32 2004
+++ ZendEngine2/zend_compile.c Thu Aug 26 19:02:55 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.567.2.6 2004/08/26 22:43:32 helly Exp $ */
+/* $Id: zend_compile.c,v 1.567.2.7 2004/08/26 23:02:55 helly Exp $ */
#include "zend_language_parser.h"
#include "zend.h"
@@ -2121,6 +2121,10 @@
return NULL;
} else {
ce = *pce;
+ }
+
+ if (parent_ce->ce_flags & ZEND_ACC_INTERFACE) {
+ zend_error(E_COMPILE_ERROR, "Class %s cannot extend from interfac %s", ce->name,
parent_ce->name);
}
zend_do_inheritance(ce, parent_ce TSRMLS_CC);