1--TEST--
2Don't optimize object -> iterable
3--EXTENSIONS--
4opcache
5--FILE--
6<?php
7
8function test(object $arg): iterable {
9    return $arg;
10}
11test(new stdClass);
12
13?>
14--EXPECTF--
15Fatal error: Uncaught TypeError: test(): Return value must be of type Traversable|array, stdClass returned in %s:%d
16Stack trace:
17#0 %s(%d): test(Object(stdClass))
18#1 {main}
19  thrown in %s on line %d
20