1--TEST--
2Asymmetric visibility nested write
3--FILE--
4<?php
5
6class Foo {
7    public private(set) Bar $bar;
8
9    public function __construct() {
10        $this->bar = new Bar;
11    }
12}
13
14class Bar {
15    public int $baz;
16}
17
18$foo = new Foo();
19$foo->bar->baz = 42;
20var_dump($foo->bar->baz);
21
22?>
23--EXPECT--
24int(42)
25