Skip to content

Closures cannot be marked as impure #6822

@cs278

Description

@cs278

Bug report

The @phpstan-impure annotation does not work when applied to closures.

Code snippet that reproduces the problem

https://phpstan.org/r/c8cb2479-b878-4c36-aa58-5f02f0eb2e5f

Expected output

No issue should be reported, like: https://phpstan.org/r/d27b1da5-5583-4b5a-b64f-403ea2cf0856

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

Made it easy to workaround this problem by updating my baseline. 😄

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions