1--TEST--
2#[\Override]: On used trait without parent method.
3--FILE--
4<?php
5
6trait T {
7    #[\Override]
8    public function t(): void {}
9}
10
11class Foo {
12    use T;
13}
14
15echo "Done";
16
17?>
18--EXPECTF--
19Fatal error: Foo::t() has #[\Override] attribute, but no matching parent method exists in %s on line %d
20