cvs: ZendEngine2 / zend_compile.c
| From: | Marcus Boerger | Date: | Thu, 26 Aug 2004 22:59:25 +0000 |
| Subject: | cvs: ZendEngine2 / zend_compile.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2909@lists.php.net to get a copy of this message | ||
helly Thu Aug 26 18:59:25 2004 EDT
Modified files:
/ZendEngine2 zend_compile.c
Log:
Enforce semantics: Classes cannot extend Interfaces
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.583&r2=1.584&ty=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.583 ZendEngine2/zend_compile.c:1.584
--- ZendEngine2/zend_compile.c:1.583 Thu Aug 26 18:32:38 2004
+++ ZendEngine2/zend_compile.c Thu Aug 26 18:59:25 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.583 2004/08/26 22:32:38 helly Exp $ */
+/* $Id: zend_compile.c,v 1.584 2004/08/26 22:59:25 helly Exp $ */
#include "zend_language_parser.h"
#include "zend.h"
@@ -2123,6 +2123,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);