1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
This commit is contained in:
orklah 2021-10-07 11:04:51 +02:00
parent 973da0a91a
commit 22fb4b5d19

View File

@ -1950,6 +1950,20 @@ class ArrayFunctionCallTest extends TestCase
'$line===' => 'array{0: int}<array-key, int>', '$line===' => 'array{0: int}<array-key, int>',
], ],
], ],
'arrayUnshiftOnEmptyArrayMeansNonEmptyList' => [
'<?php
/**
* @return non-empty-list<string>
*/
function foo(): array
{
$a = [];
array_unshift($a, "string");
return $a;
}',
],
]; ];
} }