Skip to content

Commit

Permalink
array_merge_recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Dec 18, 2022
1 parent 1dd062a commit 098d502
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stubs/CoreGenericFunctions.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ function array_key_exists($key, array $array) : bool
/**
* @psalm-pure
*
* @no-named-arguments
*
* @psalm-template TKey as array-key
* @psalm-template TValue
*
Expand Down
7 changes: 7 additions & 0 deletions tests/ArrayFunctionCallTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2774,6 +2774,13 @@ function merger(array $a, array $b) : array {
array_merge(...$map);
',
'error_message' => 'NamedArgumentNotAllowed'
],
'arrayMergeRecursiveNoNamed' => [
'code' => '<?php
$map = ["a" => []];
array_merge_recursive(...$map);
',
'error_message' => 'NamedArgumentNotAllowed'
]
];
}
Expand Down

0 comments on commit 098d502

Please sign in to comment.