diff --git a/tests/Fixtures/Php81TestClass.php b/tests/Fixtures/Php81TestClass.php index a052ec443..857c7a80f 100644 --- a/tests/Fixtures/Php81TestClass.php +++ b/tests/Fixtures/Php81TestClass.php @@ -10,12 +10,16 @@ class Php81TestClass public readonly string $a; protected readonly string $b; private readonly string $c; + public readonly array $d; public function __construct(string $a) { $this->a = $a; $this->b = $a.$a; $this->c = $a.$a.$a; + $d = [$this->a, [$this->b], [[$this->c]]]; + $d[] = &$d; + $this->d = $d; } public function typeHints(X & Y $p1) diff --git a/tests/Parser/ParserTest.php b/tests/Parser/ParserTest.php index fba54076c..f145e7628 100644 --- a/tests/Parser/ParserTest.php +++ b/tests/Parser/ParserTest.php @@ -526,6 +526,8 @@ public function testParseObjectReadonly() $this->assertTrue($val[1]->readonly); $this->assertSame('c', $val[2]->name); $this->assertTrue($val[2]->readonly); + $this->assertSame('d', $val[3]->name); + $this->assertTrue($val[3]->readonly); } /**