Skip to content

int-mask-of does not work well with operations on the int mask #9384

@stof

Description

@stof

Bug report

When doing |= operations on an int-mask field with a constant being one of the bit of that mask, we should still have a value that is valid for this int-mask.

Code snippet that reproduces the problem

this code snippet is a simplified version of the code of doctrine/deprecations:

https://phpstan.org/r/67ffb755-8bfe-4571-8013-fdd71b6aae30

Expected output

No issue should be reported

Did PHPStan help you today? Did it make you happy in any way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions