Skip to content

Retain list type when assigning to offset 1 of non-empty-list #3682

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

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Nov 27, 2024

Fixes phpstan/phpstan#12131

I don't think we can detect this edge case inside Type::setOffsetValueType() because we need info of 2 different accessory types, right? Is IntersectionType the best place then I suppose?

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@herndlm herndlm force-pushed the list-assign-offset-1 branch from cb52ced to 5570289 Compare November 27, 2024 15:04

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@ondrejmirtes ondrejmirtes merged commit 0b925a9 into phpstan:1.12.x Nov 27, 2024
452 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants