Annotation of embedaddon/php/Zend/tests/traits/bug60217c.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #60217 (Requiring the same method from different traits and abstract methods have to be compatible, in both directions.)
! 3: --FILE--
! 4: <?php
! 5:
! 6: trait TBroken1 {
! 7: public abstract function foo($a, $b = 0);
! 8: }
! 9:
! 10: trait TBroken2 {
! 11: public abstract function foo($a);
! 12: }
! 13:
! 14: class CBroken {
! 15: use TBroken1, TBroken2;
! 16:
! 17: public function foo($a) {
! 18: echo 'FOO';
! 19: }
! 20: }
! 21:
! 22: $o = new CBroken;
! 23: $o->foo(1);
! 24:
! 25: --EXPECTF--
! 26: Fatal error: Declaration of TBroken1::foo($a, $b = 0) must be compatible with TBroken2::foo($a) in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>