xref: /PHP-8.2/Zend/tests/traits/bug76700.phpt (revision 7aacc705)
1--TEST--
2Bug #76700 (false-positive "Error: Call to protected method" when using trait aliases)
3--FILE--
4<?php
5trait T1
6{
7    protected function aa() { echo 123; }
8}
9
10trait T2
11{
12    use T1 {
13        aa as public;
14    }
15}
16
17class A
18{
19    use T1;
20}
21
22class B extends A
23{
24    use T2;
25}
26
27$b = new B();
28$b->aa();
29?>
30--EXPECT--
31123
32