xref: /PHP-8.2/Zend/tests/bug80055.phpt (revision 4ece62fb)
1--TEST--
2Bug #80055: Abstract trait methods returning "self" cannot be fulfilled by traits
3--FILE--
4<?php
5
6trait AbstractTrait {
7    abstract public function selfReturner(): self;
8}
9
10trait ConcreteTrait {
11    public function selfReturner(): self {
12        return $this;
13    }
14}
15
16class Test {
17    use AbstractTrait;
18    use ConcreteTrait;
19}
20
21?>
22===DONE===
23--EXPECT--
24===DONE===
25