Skip to content

Tracking of impure functions calls invalidating remembered calls is not working for calls happening in conditions #5984

@stof

Description

@stof

Bug report

Code snippet that reproduces the problem

https://phpstan.org/r/4ac12ab2-b5be-4d0e-911b-d55264f521ab

Expected output

No issue reported. !$scanner->isDone() can change value, as scanChar() and readChar() are modifying the state of the scanner.

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

After upgrading to PHPStan 1.x, it allowed finding some dead code (a ternary being always true) in scssphp. So definitely good that it improves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions