1--TEST--
2R/w cache slots should be unshared
3--FILE--
4<?php
5
6class P {
7    public private(set) string $bar;
8}
9
10class C extends P {
11    public function setBar($bar) {
12        var_dump($this->bar);
13        $this->bar = $bar;
14    }
15}
16
17$c = new C();
18try {
19    $c->setBar(1);
20} catch (Error $e) {
21    echo $e->getMessage(), "\n";
22}
23try {
24    $c->setBar(1);
25} catch (Error $e) {
26    echo $e->getMessage(), "\n";
27}
28var_dump($c);
29
30?>
31--EXPECTF--
32Typed property P::$bar must not be accessed before initialization
33Typed property P::$bar must not be accessed before initialization
34object(C)#%d (0) {
35  ["bar"]=>
36  uninitialized(string)
37}
38