Bug report
Affected Version:
= 2.1.41
Problem:
Using a match expression, covering all possible options leads to an error, when it is used inside a foreach loop.
Running the same match expression on a single item, the error is gone.
Interstingly the error is gone, enabling "treatPhpDocTypesAsCertain"
Code snippet that reproduces the problem
https://phpstan.org/r/f6ae2fe6-cd75-4191-a7c8-96bfa4714b35
Expected output
I would expect no error to happen.
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
Affected Version:
Problem:
Using a match expression, covering all possible options leads to an error, when it is used inside a foreach loop.
Running the same match expression on a single item, the error is gone.
Interstingly the error is gone, enabling "treatPhpDocTypesAsCertain"
Code snippet that reproduces the problem
https://phpstan.org/r/f6ae2fe6-cd75-4191-a7c8-96bfa4714b35
Expected output
I would expect no error to happen.
Did PHPStan help you today? Did it make you happy in any way?
No response