Skip to content

Commit b4299be

Browse files
hrachondrejmirtes
authored andcommitted
regression test for assign empty array to array of array of generic
1 parent b6f90be commit b4299be

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/PHPStan/Rules/Properties/data/properties-assigned-types.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,16 @@ public function doBar($a)
286286
}
287287

288288
}
289+
290+
/**
291+
* @template T
292+
*/
293+
class Baz {
294+
/** @var array{array<T>} */
295+
private $var;
296+
297+
function test(): void
298+
{
299+
$this->var = [[]];
300+
}
301+
}

0 commit comments

Comments
 (0)