bug70957.phpt 363 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #70957 (self::class can not be resolved with reflection for abstract class)
  3. --FILE--
  4. <?php
  5. abstract class Foo
  6. {
  7. function bar($a = self::class) {}
  8. }
  9. trait T {
  10. public function bar() {
  11. }
  12. }
  13. class B extends Foo
  14. {
  15. use T;
  16. }
  17. ?>
  18. --EXPECTF--
  19. Fatal error: Declaration of T::bar() must be compatible with Foo::bar($a = 'Foo') in %s on line %d