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

Fixing completion suggestions for collections of anonymous records #14976

Conversation

T-Gro
Copy link
Member

@T-Gro T-Gro commented Mar 24, 2023

The issue #14812 affected access to a collection of anonymous records, processed either via indexer or via a module function converting the collection to a single item.
The existing autocomplete logic in VS adds in keywords if the suggestion isn't for a long dotted-identifier, or if it isn't for a known type. In this case, anonymous records were not considered to be a type (isForType was false), but from a suggestion perspective, they are a type and should be treated here for the completion list just like regular records

Before:
image

After:
image
image

@T-Gro T-Gro marked this pull request as ready for review March 26, 2023 20:50
@T-Gro T-Gro requested a review from a team as a code owner March 26, 2023 20:50
…ng-members-on-a-anonymous-record-in-a-collection
@abonie abonie merged commit df00173 into dotnet:main Mar 27, 2023
@psfinaki
Copy link
Member

A bit late to the party - but shouldn't anonymous records actually be considered as a type even from the compiler perspective?

vzarytovskii pushed a commit that referenced this pull request Mar 28, 2023
Co-authored-by: Tomas Grosup <[email protected]>
Co-authored-by: Jakub Majocha <[email protected]>
Co-authored-by: Vlad Zarytovskii <[email protected]>
Fixing completion for collections of anonymous records (#14976)
kant2002 pushed a commit to kant2002/fsharp that referenced this pull request Apr 1, 2023
@T-Gro T-Gro deleted the 14812-keyword-suggestions-shown-when-accessing-members-on-a-anonymous-record-in-a-collection branch April 4, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Keyword suggestions shown when accessing members on a anonymous record in a collection
5 participants