blob: d434e271c620711f55a98876d031fb445934d81e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
--TEST--
Bug #62069: binding wrong traits if they have same name methods
--FILE--
<?php
trait T1 {
public function func() {
echo "From T1\n";
}
}
trait T2 {
public function func() {
echo "From T2\n";
}
}
class Bar {
public function func() {
echo "From Bar\n";
}
use T1, T2 {
func as f1;
}
}
$b = new Bar();
$b->f2();
?>
--EXPECTF--
Fatal error: An alias was defined for method func(), which exists in both T1 and T2. Use T1::func or T2::func to resolve the ambiguity in %s on line %d
|