blob: b6c3b545156d03e72c82d2e1f47bdb4576a51459 (
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
33
34
35
|
--TEST--
Bug #55424 (Method got missing from class when a trait defined an abstract method to express a requirement)
--FILE--
<?php
trait ATrait
{
function setRequired()
{
$this->setAttribute();
}
abstract function setAttribute();
}
class Base
{
function setAttribute() { }
}
class MyClass extends Base
{
use ATrait;
}
$i = new Base();
$i->setAttribute();
$t = new MyClass();
/* setAttribute used to disappear for no good reason. */
$t->setRequired();
echo 'DONE';
?>
--EXPECT--
DONE
|