1--TEST--
2JIT: FETCH_OBJ 006
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit_buffer_size=1M
8--FILE--
9<?php
10class Test {
11    readonly array $prop;
12}
13
14$test = new Test;
15
16try {
17    throw new Exception;
18} catch (Exception) {}
19
20$appendProp2 = (function() {
21    $this->prop[] = 1;
22})->bindTo($test, Test::class);
23$appendProp2();
24?>
25--EXPECTF--
26Fatal error: Uncaught Error: Cannot indirectly modify readonly property Test::$prop in %s:%d
27Stack trace:
28#0 %sfetch_obj_006.php(15): Test->{closure}()
29#1 {main}
30  thrown in %sfetch_obj_006.php on line 13
31