From: Stefan Marr Date: Tue, 1 Nov 2011 00:39:10 +0000 (+0000) Subject: Fixed Bug #60145 (Usage of trait's use statement inside interfaces not properly checked.) X-Git-Tag: php-5.4.0RC1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5f15ef561fcf8348fc9e3b986f096eacf4e243c;p=php Fixed Bug #60145 (Usage of trait's use statement inside interfaces not properly checked.) --- diff --git a/Zend/tests/traits/bug60145.phpt b/Zend/tests/traits/bug60145.phpt new file mode 100644 index 0000000000..fcd0cfa5f2 --- /dev/null +++ b/Zend/tests/traits/bug60145.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #60145 (Usage of trait's use statement inside interfaces not properly checked.) +--FILE-- +ce_flags & ZEND_ACC_INTERFACE)) { + zend_error(E_COMPILE_ERROR, + "Cannot use traits inside of interfaces. %s is used in %s", + Z_STRVAL(trait_name->u.constant), CG(active_class_entry)->name); + } + switch (zend_get_class_fetch_type(Z_STRVAL(trait_name->u.constant), Z_STRLEN(trait_name->u.constant))) { case ZEND_FETCH_CLASS_SELF: