1--TEST--
2Replacing object type with not-loadable intersection type
3--FILE--
4<?php
5
6
7class Test {
8    function method(): object {}
9}
10class Test2 extends Test {
11    function method(): X&Y {}
12}
13
14?>
15===DONE===
16--EXPECTF--
17Fatal error: Could not check compatibility between Test2::method(): X&Y and Test::method(): object, because class X is not available in %s on line %d
18