diff options
| author | Marcus Boerger <helly@php.net> | 2004-08-26 22:59:25 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2004-08-26 22:59:25 +0000 |
| commit | ec4f576cb38ac94a0203191ebc360e0c0a73f8e2 (patch) | |
| tree | f4eed9eb3df93a80f203970d5e474f902da77526 | |
| parent | b1d43bac613e10d173c978b5549577acf396db04 (diff) | |
| download | php-git-ec4f576cb38ac94a0203191ebc360e0c0a73f8e2.tar.gz | |
Enforce semantics: Classes cannot extend Interfaces
| -rw-r--r-- | Zend/zend_compile.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 2c1faddc57..862ba578f2 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2125,6 +2125,10 @@ ZEND_API zend_class_entry *do_bind_inherited_class(zend_op *opline, HashTable *c 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); ce->refcount++; |
