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

Bogus error when unsetting offset of array property #6399

Closed
dktapps opened this issue Jan 17, 2022 · 3 comments
Closed

Bogus error when unsetting offset of array property #6399

dktapps opened this issue Jan 17, 2022 · 3 comments
Labels
Milestone

Comments

@dktapps
Copy link
Contributor

dktapps commented Jan 17, 2022

Bug report

This is a weird one, because it didn't show up on my failed build, but I stumbled across it when identifying another bug on phpstan.org.

Code snippet that reproduces the problem

https://phpstan.org/r/46b7df20-3bc4-45d3-940e-3e12260e456a

Expected output

No error should be reported.

@ondrejmirtes
Copy link
Member

Yeah, the property itself shouldn't become nullable after unsetting an offset: https://phpstan.org/r/b3fd427a-bc1b-4bce-a27a-fb782c13e4af

@ondrejmirtes
Copy link
Member

Fixed: phpstan/phpstan-src@b43c057

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants