Skip to content

Conversation

@mad-briller
Copy link
Contributor

Also improves the array_map return type extension to be smarter about generic callables, specifically for single argument constant arrays.

This improves the situation of phpstan/phpstan#10685 but i hesitate to say it solves it, there are some underlying issues that i'll add to the relevant test locations on this pr

@mad-briller mad-briller marked this pull request as draft March 9, 2024 13:08
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i had to change the generic type names of this function from A B C D to something else, as identity() and identity2() are also using A and B as generic type names, which made the type resolution fail. Been trying to dig into it a bit but as for why i'm really not sure right now,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this be related to TemplateTypeScope? i'm yet to properly understand it's role in the type resolution but it seems like it could be pertinent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant