We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 548f4f6 commit 1cd1f80Copy full SHA for 1cd1f80
tests/PHPStan/Rules/Variables/NullCoalesceRuleTest.php
@@ -362,4 +362,9 @@ public function testBug14213(): void
362
]);
363
}
364
365
+ public function testBug13921(): void
366
+ {
367
+ $this->analyse([__DIR__ . '/data/bug-13921.php'], []);
368
+ }
369
+
370
tests/PHPStan/Rules/Variables/data/bug-13921.php
@@ -0,0 +1,9 @@
1
+<?php
2
3
+namespace Bug13921;
4
5
+/** @param list<array<?string>> $x */
6
+function foo(array $x): void {
7
+ var_dump($x[0]['bar'] ?? null);
8
+ var_dump($x[0] ?? null);
9
+}
0 commit comments