2 <<file
:__EnableUnstableFeatures('readonly')>>
6 public readonly Bar
$ro;
8 public function __construct() {
10 $this->ro
= new Bar();
11 $this->not_ro
= new Bar();
13 public function set(int $y) : void
{
17 public readonly
function get() : int {
23 function test(readonly (Foo
, Foo
) $x): void
{
25 $a->prop
= 4; // error $a is readonly
26 $b->prop
= 4; // error $b is readonly