1--TEST--
2Test that a mixed return type can be overridden by any union return type
3--FILE--
4<?php
5
6class Foo
7{
8    public function method(): mixed {}
9}
10
11class Bar1 extends Foo
12{
13    public function method(): bool|int|null {}
14}
15
16class Bar3 extends Foo
17{
18    public function method(): bool|int|float|string|array|object|null {}
19}
20
21class Bar4 extends Foo
22{
23    public function method(): stdClass|Foo {}
24}
25
26?>
27--EXPECT--
28