1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00
This commit is contained in:
Daniil Gentili 2022-12-18 14:50:51 +01:00
parent b83226a0db
commit 1dd062a810
2 changed files with 23 additions and 0 deletions

View File

@ -347,6 +347,22 @@ function array_merge_recursive(array ...$arrays)
{
}
/**
* @psalm-pure
*
* @no-named-arguments
*
* @psalm-template TKey as array-key
* @psalm-template TValue
*
* @param array<TKey, TValue> ...$arrays
*
* @return array<TKey, TValue>
*/
function array_merge(array ...$arrays)
{
}
/**
* @psalm-pure
*

View File

@ -2768,6 +2768,13 @@ class ArrayFunctionCallTest extends TestCase
array_combine(["a", "b"], [1, 2, 3]);',
'error_message' => 'InvalidArgument',
],
'arrayMergeNoNamed' => [
'code' => '<?php
$map = ["a" => []];
array_merge(...$map);
',
'error_message' => 'NamedArgumentNotAllowed'
]
];
}
}