Annotation of embedaddon/php/Zend/tests/traits/error_014.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Trying to override final method
        !             3: --FILE--
        !             4: <?php
        !             5: 
        !             6: trait foo {
        !             7:        public function test() { return 3; }
        !             8: }
        !             9: 
        !            10: class baz {
        !            11:        final public function test() { return 4; }
        !            12: }
        !            13: 
        !            14: class bar extends baz {
        !            15:        use foo { test as public; }
        !            16: }
        !            17: 
        !            18: $x = new bar;
        !            19: var_dump($x->test());
        !            20: 
        !            21: ?>
        !            22: --EXPECTF--
        !            23: Fatal error: Cannot override final method baz::test() in %s on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>