1--TEST--
2#[Override] attribute in trait does not check for parent class implementations (Variant with __construct)
3--FILE--
4<?php
5
6class A {
7    public function __construct() {}
8}
9
10trait T {
11    #[\Override]
12    public function __construct() {
13        echo 'foo';
14    }
15}
16
17class D extends A {
18    use T;
19}
20echo "Done";
21
22?>
23--EXPECTF--
24Fatal error: D::__construct() has #[\Override] attribute, but no matching parent method exists in %s on line %d
25