Skip to content

Unset seems to reset the array types #5223

@alexander-schranz

Description

@alexander-schranz

Bug report

When an unset is called on a typed array the types seems to get lost or replaced by other types.

Code snippet that reproduces the problem

https://phpstan.org/r/7f6452ee-c77f-49b0-af7f-d5cca60acef3

Expected output

The example should output no errors.

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

Yes! It does a great Job 👍, thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions