Skip to content

"RedundantCondition - positive-int can never contain 0" on a result of a bit & operation that can be 0 #5227

@sad-spirit

Description

@sad-spirit

I suspect psalm incorrectly assumes positive-int type for the result of a bit operation with two positive-int arguments. But while 1 and 2 are positive, 1 & 2 is not.

https://psalm.dev/r/d174e99595

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions