1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Add failing test

This commit is contained in:
Jack Robertson 2021-07-24 16:02:13 +01:00
parent 3caceb7131
commit 3eea15e840

View File

@ -0,0 +1,28 @@
<?php
namespace Psalm\Tests\ReturnTypeProvider;
use Psalm\Tests\TestCase;
use Psalm\Tests\Traits\ValidCodeAnalysisTestTrait;
class ArraySliceTest extends TestCase
{
use ValidCodeAnalysisTestTrait;
public function providerValidCodeParse(): iterable
{
yield 'arraySliceWithTemplatedArrayParameter' => [
'<?php
/**
* @template T as string[]
* @param T $a
* @return string[]
*/
function f(array $a): array
{
return array_slice($a, 1);
}
',
];
}
}