Autocompletion: Reintroduce enum options on assignment #96326
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Important
Since on
master
#96213 was caused by overlapping issues from #85224 and #94082 this PR can not be cherry-pickedFixes #96213
Fixes #95986
CompletionIdentifier
so we can't just store and return the completion identifiers datatypep_force
parameter which I removed in Autocompletion: Rework argument options string literal completion #94082, in investigating those issues I found out why we need it 🥳 (I added a comment in case the question comes up again). Luckily my assumptions from Autocompletion: Rework argument options string literal completion #94082 that it should be true almost always still holds, so I changed the default value accordingly. In the very specific case that we try to push a context but haven't consumed any tokens for the structure, that this context relates to, we don't want to override an existing context.parse_precedence
the fact that all identifiers were never pushed withp_force
caused some issues before. Now if an identifier is actually consumed the context is pushed withp_force
, and can be overridden in specific contexts (e.g. in an assignment)