xref: /PHP-8.4/Zend/tests/traits/language015.phpt (revision 7aacc705)
1--TEST--
2Invalid conflict resolution (unused trait as lhs of "insteadof")
3--FILE--
4<?php
5trait T1 {
6    function foo() {echo "T1\n";}
7}
8trait T2 {
9        function foo() {echo "T2\n";}
10}
11class C {
12    use T1 {
13        T2::foo insteadof T1;
14    }
15}
16?>
17--EXPECTF--
18Fatal error: Required Trait T2 wasn't added to C in %slanguage015.php on line %d
19