Skip to content

Bug: Infer array key types #3266

@thomasvargiu

Description

@thomasvargiu

Bug report

When creating an array from a another array, types doesn't match

Code snippet that reproduces the problem

https://phpstan.org/r/ca15ef9e-7fb5-40cf-907d-245208b6cd5e
https://phpstan.org/r/5de4b97f-6994-4463-8141-b741a28c0512

Expected output

Expected same type of the input array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions