Found while testing 5.0.0-rc1
https://psalm.dev/r/72fd1e5782
A variable typed as int|false is compared with zero ($length > 0). Afterwards, Psalm correctly infers that it has to be 1 or higher (int<1, max>). But it still considers false to be possible although (false > 0) === false.
Found while testing 5.0.0-rc1
https://psalm.dev/r/72fd1e5782
A variable typed as
int|falseis compared with zero ($length > 0). Afterwards, Psalm correctly infers that it has to be 1 or higher (int<1, max>). But it still considersfalseto be possible although(false > 0) === false.