vimeo / psalm

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

Incorrect comparison of inherited "static" types #11139

Open mj4444ru opened 1 month ago

mj4444ru commented 1 month ago

https://psalm.dev/r/e205e7be5f https://psalm.dev/r/0535cc284a

I expect that these 2 examples should pass the test equally correctly, since the types should inherit from the interface, but for some reason this does not happen.

psalm-github-bot[bot] commented 1 month ago

I found these snippets:

https://psalm.dev/r/e205e7be5f ```php
https://psalm.dev/r/0535cc284a ```php
mj4444ru commented 1 month ago

https://psalm.dev/r/51e9ac4bb6

Here is another case

psalm-github-bot[bot] commented 1 month ago

I found these snippets:

https://psalm.dev/r/51e9ac4bb6 ```php