1--TEST--
2Abstract method in trait using "self" (delayed obligation)
3--FILE--
4<?php
5
6spl_autoload_register(function($class) {
7    if ($class == T::class) {
8        trait T {
9            abstract private function method($x): self;
10        }
11    } else if ($class == C::class) {
12        class C {
13            use T;
14
15            private function method($x): D {
16                return new D;
17            }
18        }
19    } else if ($class == D::class) {
20        class D extends C {}
21    }
22});
23
24new C;
25
26?>
27===DONE===
28--EXPECT--
29===DONE===
30