Skip to content

Callable type is lost when accessing a constant array of callables by key #3616

@ramonacat

Description

@ramonacat

Bug report

If there's a constant array of callables, after using a variable as key to the array, the value is not considered callable.

Code snippet that reproduces the problem

https://phpstan.org/r/cb3fafd4-7c39-47c9-ac6a-972d110b47d5

Expected output

No errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions