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

Improve adding value to array-shape-list #8074

Open
AndrolGenhald opened this issue Jun 8, 2022 · 0 comments
Open

Improve adding value to array-shape-list #8074

AndrolGenhald opened this issue Jun 8, 2022 · 0 comments

Comments

@AndrolGenhald
Copy link
Collaborator

AndrolGenhald commented Jun 8, 2022

Could you just check what is the resulting type if you have a array{0: int, 1: bool, 2: string}<int<3, max>, mixed> for $var and you do a $var[] = 'a'?

Originally posted by @orklah in #8050 (comment)

It becomes non-empty-list<bool|int|mixed|string>, which seems a bit unfortunate since that's strictly less specific than the previous type...

@AndrolGenhald AndrolGenhald changed the title https://github.com/vimeo/psalm/pull/8050#discussion_r888222179 Improve adding value to array-shape-list Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant