Skip to content

Filter completions for record fields in patterns #15903

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 6 commits into from
Sep 5, 2023
Merged

Conversation

kerams
Copy link
Contributor

@kerams kerams commented Aug 30, 2023

Fixes #15889.

| { } and | { f = 1; g } do not recover gracefully and there is no match clause, let alone SynPat.Record. Didn't feel like fixing that here.

@kerams kerams requested a review from a team as a code owner August 30, 2023 16:53
Copy link
Member

@vzarytovskii vzarytovskii left a comment

Choose a reason for hiding this comment

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

Nice

@auduchinok
Copy link
Member

| { } and | { f = 1; g } do not recover gracefully and there is no match clause, let alone SynPat.Record. Didn't feel like fixing that here.

I can work on it if you want to wait a bit here or help me fix the code completion later.

@kerams
Copy link
Contributor Author

kerams commented Aug 31, 2023

I reckon that if you manage to return SynPat.Record ([], m) and SynPat.Record ([ oneField ], m)/SynPat.Record ([ oneField; SynPat.FromParseError (...) ], m) for the 2 clauses, completions will work nicely without any changes.

@psfinaki
Copy link
Member

psfinaki commented Sep 4, 2023

So this can be simplified after #15921?

@vzarytovskii vzarytovskii enabled auto-merge (squash) September 4, 2023 13:27
@vzarytovskii
Copy link
Member

Should auto-merge when comments are resolved.

@auduchinok
Copy link
Member

@vzarytovskii If we decide to merge #15921 first, it would be better to double check that this PR doesn't need any updates.

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

Successfully merging this pull request may close these issues.

Record names are not suggested in the pattern matching
6 participants