Bug report
In the following example
https://phpstan.org/r/3ac09ec1-e62e-42b0-b853-06a1450c238f
The array $foo is considered as non empty but shouldn't.
If I pass [], [] to the method, the final array is empty.
As soon as I change the typehint from list to array, the array is correctly inferred as array (and not non-empty-array)
https://phpstan.org/r/1b3c3201-730a-488e-988d-8e7ec87bad30
Code snippet that reproduces the problem
https://phpstan.org/r/3ac09ec1-e62e-42b0-b853-06a1450c238f
Expected output
No error
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
In the following example
https://phpstan.org/r/3ac09ec1-e62e-42b0-b853-06a1450c238f
The array $foo is considered as non empty but shouldn't.
If I pass
[], []to the method, the final array is empty.As soon as I change the typehint from list to array, the array is correctly inferred as array (and not non-empty-array)
https://phpstan.org/r/1b3c3201-730a-488e-988d-8e7ec87bad30
Code snippet that reproduces the problem
https://phpstan.org/r/3ac09ec1-e62e-42b0-b853-06a1450c238f
Expected output
No error
Did PHPStan help you today? Did it make you happy in any way?
No response