vimeo / psalm

A static analysis tool for finding errors in PHP applications
https://psalm.dev
MIT License
5.49k stars 655 forks source link

Trouble with switch case in try catch block #11016

Open bless-rng opened 2 weeks ago

bless-rng commented 2 weeks ago

As you can see switch block has all cases. Try block also has all cases for correct resolve result. If switch case replace with if else block this case also is correct. Variable $x is not possible to be undefined.

https://psalm.dev/r/14034f3334

psalm-github-bot[bot] commented 2 weeks ago

I found these snippets:

https://psalm.dev/r/14034f3334 ```php