php-src/Zend/tests/bug80055.phpt
Nikita Popov 4ece62fba9 Fix bug #80055
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.
2020-10-15 14:24:25 +02:00

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===