xref: /PHP-7.4/Zend/tests/traits/bug76700.phpt (revision d679f022)
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--EXPECT--
30123
31