Skip to content

Commit

Permalink
regression test for assign empty array to array of array of generic
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach authored and ondrejmirtes committed Sep 25, 2020
1 parent b6f90be commit b4299be
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/PHPStan/Rules/Properties/data/properties-assigned-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,16 @@ public function doBar($a)
}

}

/**
* @template T
*/
class Baz {
/** @var array{array<T>} */
private $var;

function test(): void
{
$this->var = [[]];
}
}

0 comments on commit b4299be

Please sign in to comment.