mirror of
https://github.com/php/php-src.git
synced 2024-10-02 23:36:16 +00:00
12cf1b7978
- also added test to check for inconsistent abstract method definitions, they need to be compatible
27 lines
337 B
PHP
27 lines
337 B
PHP
--TEST--
|
|
Bug #60217 (Requiring the same method from different traits.)
|
|
--FILE--
|
|
<?php
|
|
|
|
trait T1 {
|
|
public abstract function foo();
|
|
}
|
|
|
|
trait T2 {
|
|
public abstract function foo();
|
|
}
|
|
|
|
class C {
|
|
use T1, T2;
|
|
|
|
public function foo() {
|
|
echo "C::foo() works.\n";
|
|
}
|
|
}
|
|
|
|
$o = new C;
|
|
$o->foo();
|
|
|
|
--EXPECTF--
|
|
C::foo() works.
|