2 <<file
:__EnableUnstableFeatures('readonly')>>
7 public readonly vec
<Foo
> $bar = vec
[];
8 public static readonly vec
<Foo
> $static_vec = vec
[];
9 public readonly Baz
$baz;
10 public function __construct() {
12 $this->baz
= new Baz();
17 function main(): void
{
18 $y = Vector
{ readonly
new Foo() };
19 $y[] = new Foo(); // error $y should be readonly