-
Notifications
You must be signed in to change notification settings - Fork 668
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
Incorrectly asserting non-empty-list after combining with empty list #9787
Incorrectly asserting non-empty-list after combining with empty list #9787
Conversation
7b0cdb3
to
762670f
Compare
Tracked this down to here: psalm/src/Psalm/Internal/Type/TypeCombiner.php Lines 1364 to 1448 in 5370492
Need to get my head around the interactions between Current best effort is switching psalm/src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/ArrayAssignmentAnalyzer.php Lines 692 to 704 in 5370492
but it needs to be smarter than that as then we loose |
Yeah, this breaks things pretty dramatically :D Not sure if I'll be able to find time to dig into it to help in the foreseeable future |
762670f
to
8ea2e75
Compare
…g a non-empty-list
8d4bdd6
to
6044cc7
Compare
Finally found the time to crack this, nested array type combiners were inheriting overwrite_empty_array so I've made it only apply to root level array type modifications and not any value types. |
Thanks! |
Fixes #9594