diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-03-10 16:17:32 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-03-10 16:19:11 +0100 |
commit | d9219f997df2e5852f76e04767baaca4acf729e7 (patch) | |
tree | 3443216b75fea276385720f95d2f28bab102f618 /Zend/zend_inheritance.c | |
parent | fff5771cccaca49565c90349320f3c06cbe19328 (diff) | |
download | php-git-d9219f997df2e5852f76e04767baaca4acf729e7.tar.gz |
Enable better trait conflict error message
I don't think there is any reason to disable this anymore,
at least all the messages generated in tests look correct and
more useful.
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r-- | Zend/zend_inheritance.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index eab275e509..a4371db6f2 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -1612,15 +1612,10 @@ static void zend_add_trait_method(zend_class_entry *ce, zend_string *name, zend_ } else if (UNEXPECTED((existing_fn->common.scope->ce_flags & ZEND_ACC_TRAIT) && !(existing_fn->common.fn_flags & ZEND_ACC_ABSTRACT))) { /* two traits can't define the same non-abstract method */ -#if 1 - zend_error_noreturn(E_COMPILE_ERROR, "Trait method %s has not been applied, because there are collisions with other trait methods on %s", - ZSTR_VAL(name), ZSTR_VAL(ce->name)); -#else /* TODO: better error message */ zend_error_noreturn(E_COMPILE_ERROR, "Trait method %s::%s has not been applied as %s::%s, because of collision with %s::%s", ZSTR_VAL(fn->common.scope->name), ZSTR_VAL(fn->common.function_name), ZSTR_VAL(ce->name), ZSTR_VAL(name), ZSTR_VAL(existing_fn->common.scope->name), ZSTR_VAL(existing_fn->common.function_name)); -#endif } else { /* inherited members are overridden by members inserted by traits */ /* check whether the trait method fulfills the inheritance requirements */ |