Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TypeUtils::getOldConstantArrays in array_fill_keys extension #1676

Merged

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Sep 1, 2022

jfyi: an optional key that is not at the end of the array will lead to a union key which will lead to generalization to a generic array via the ConstantArrayBuilder, which makes sense since a union cannot be used as key. this is not changed behaviour but surprised me for a second when I added optional key tests :)

@herndlm herndlm changed the title Array fill keys get old constant arrays Use TypeUtils::getOldConstantArrays in array_shift extension Sep 1, 2022
@herndlm
Copy link
Contributor Author

herndlm commented Sep 1, 2022

This time I opened it with the wrong title and forgot to change commit messages. Ondrej, please show mercy :D

@herndlm herndlm changed the title Use TypeUtils::getOldConstantArrays in array_shift extension Use TypeUtils::getOldConstantArrays in array_fill_keys extension Sep 1, 2022
@herndlm herndlm force-pushed the array-fill-keys-get-old-constant-arrays branch from ef73a7e to a39e570 Compare September 1, 2022 08:06
@ondrejmirtes ondrejmirtes merged commit fc69708 into phpstan:1.8.x Sep 1, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@herndlm herndlm deleted the array-fill-keys-get-old-constant-arrays branch September 1, 2022 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants