1--TEST--
2Replacing iterable type with non-Traversable intersection type
3--FILE--
4<?php
5
6interface X {}
7interface Y {}
8
9class Test {
10    function method(): iterable {}
11}
12class Test2 extends Test {
13    function method(): X&Y {}
14}
15
16?>
17--EXPECTF--
18Fatal error: Declaration of Test2::method(): X&Y must be compatible with Test::method(): Traversable|array in %s on line %d
19