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

Member completion uses wrong qualifier #18033

Closed
auduchinok opened this issue Nov 19, 2024 · 1 comment · Fixed by #18111
Closed

Member completion uses wrong qualifier #18033

auduchinok opened this issue Nov 19, 2024 · 1 comment · Fixed by #18111
Labels
Area-LangService-AutoComplete autocomplete/intellisense Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@auduchinok
Copy link
Member

Consider the following example:

let f (s: string) =
    s.Trim()
    s.Trim()
    s.Trim()
    ()

It's expected that the member code completion is the same after each s.Trim() invocation, however, members are suggested in the first case only, and the next two cases suggest unqualified items:

Image
Image

Initially reported in RIDER-120178.

@github-actions github-actions bot added this to the Backlog milestone Nov 19, 2024
@abonie abonie added Area-LangService-ToolTips tooltips/hover/quickinfo Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. Area-LangService-AutoComplete autocomplete/intellisense and removed Needs-Triage Area-LangService-ToolTips tooltips/hover/quickinfo labels Nov 25, 2024
@auduchinok
Copy link
Member Author

The issue has been introduced in #16882. cc @brianrourkeboll

Commenting out the following fixes a test case I've added:

// Nested sequentials.
| SynExpr.Sequential(expr1 = synExpr1; expr2 = synExpr2 & SynExpr.Sequential _) ->
[
dive synExpr1 synExpr1.Range traverseSynExpr
yield! traverseSequentials path synExpr2
]
|> pick expr

See the test in this branch:
https://github.com/auduchinok/fsharp/blob/3904ceda0089f3799eff70eabf2963af8c7e5f3d/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs#L124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-AutoComplete autocomplete/intellisense Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants