Skip to content

array{id: int} can be widened to mixed[] by inline @var while array<int> not #10130

@janedbal

Description

@janedbal

Bug report

See snippet, imo all those should report an error.

Code snippet that reproduces the problem

https://phpstan.org/r/2023fc68-0805-490b-94c9-932821346b44

Expected output

Report even third widening.

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

No response

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