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