mirror of
https://github.com/php/php-src.git
synced 2025-01-05 18:33:56 +08:00
4ece62fba9
We need to perform trait scope fixup for both methods involved in the inheritance check. For that purpose we already need to thread through a separate fn scope through the entire inheritance checking machinery.
25 lines
377 B
PHP
25 lines
377 B
PHP
--TEST--
|
|
Bug #80055: Abstract trait methods returning "self" cannot be fulfilled by traits
|
|
--FILE--
|
|
<?php
|
|
|
|
trait AbstractTrait {
|
|
abstract public function selfReturner(): self;
|
|
}
|
|
|
|
trait ConcreteTrait {
|
|
public function selfReturner(): self {
|
|
return $this;
|
|
}
|
|
}
|
|
|
|
class Test {
|
|
use AbstractTrait;
|
|
use ConcreteTrait;
|
|
}
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|