Skip to content

While-true: Specific type is forgotten #10980

@greew

Description

@greew

Bug report

When ensuring that a variable $user is of a specific type, when I break the loop, PHPStan afterwards forgets this type and reverts to the original result from the method call a().

Code snippet that reproduces the problem

https://phpstan.org/r/e75b4a5f-6dad-48f9-9f39-1e427351a002

Expected output

No errors

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

Still one of the best development tools, I've got!!! ❤️

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions