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

Fix special case in switch expr completion #1002

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

zth
Copy link
Collaborator

@zth zth commented Jun 4, 2024

Fixes a special case.

@zth zth requested a review from cristianoc June 4, 2024 07:02
@@ -587,6 +587,14 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor
if Debug.verbose () && debugTypedCompletionExpr then
print_endline "[typedCompletionExpr] No cases, rest";
()
| Pexp_match (expr, [{pc_lhs; pc_rhs}])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a comment here as the case is similar to what's in the comment for the next case.

@zth
Copy link
Collaborator Author

zth commented Jun 4, 2024

Note to self: This logic can probably be cleaned up a little bit in the future.

@zth zth merged commit 5734b9f into master Jun 4, 2024
5 checks passed
@zth zth deleted the completion-switch-expr-special-case branch June 4, 2024 08:27
jfrolich pushed a commit to jfrolich/rescript-vscode that referenced this pull request Sep 3, 2024
* fixes a special case in switch expr completion

* changelog

* add comments
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.

2 participants