-
-
Notifications
You must be signed in to change notification settings - Fork 947
Undetected "Cannot unpack array with string keys" #5764
Copy link
Copy link
Closed
Labels
Description
Bug report
The following code snippet results in Cannot unpack array with string keys, but phpstan says there is no error:
function foo(int ...$is): array
{
return [...$is];
}
foo(...['a' => 2]);Code snippet that reproduces the problem
Expected output
Some error that string keys are not supported in unpacked arrays
Did PHPStan help you today? Did it make you happy in any way?
Love it!
Reactions are currently unavailable