abstract_method_2.phpt 325 B

12345678910111213141516171819202122
  1. --TEST--
  2. Mutually incompatible methods from traits are fine as long as the final method is compatible
  3. --FILE--
  4. <?php
  5. trait T1 {
  6. abstract public function test();
  7. }
  8. trait T2 {
  9. abstract public function test(): int;
  10. }
  11. class C {
  12. use T1, T2;
  13. public function test(): int {}
  14. }
  15. ?>
  16. ===DONE===
  17. --EXPECT--
  18. ===DONE===