Repository navigation
Visual Studio : When defining names in pattern matching auto completion should not be triggered. #5594
Description
Activity
In your first example, I'd expect a filtered list showing only types. You often match for a DU and assign names inside.
match smth with | Call(None, methInfo, args) -> ...
Reacted by Goswin@rojepp a distinction between typing a DU/Enum or a new name could be made when the first letter is typed in upper or lower case.
- addedImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.
on Sep 13, 2018 It would be great to have this fixed (I notice it quite often but just mentally ignore it after too long)
- removedImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.
on Apr 6, 2019 3 remaining items
- addedArea-LangService-AutoCompleteautocomplete/intellisenseautocomplete/intellisenseand removed
on Apr 5, 2022 The right side of
asis also a pattern, so completions could be desirable.github-actions commented
on Sep 29, 2026 on Sep 29, 2026 – with GitHub ActionsContributorMore actions🤖 This is an automated response from Repo Assist.
This issue is testable cross-platform through FSharp.Compiler.Service: completion is produced by
GetDeclarationListInfo, and the repository test helperChecker.getCompletionInfoexercises that API directly. I have therefore removed theAI-thinks-windows-onlylabel.The issue still reproduces at current HEAD
9b0b8a44015743b1c6a05fc0a739dfcddcf353ba(committed 2026-09-29, less than one day old). A focused FCS test run used these caret positions and expected zero completion items:match A 1 with | A value{caret} -> (): 205 itemsfor value{caret} in [ 1 ] do (): 202 itemsmatch box 1 with | :? int as value{caret} -> () | _ -> (): 202 items
The exact command was
dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --filter-method '*Issue 5594*' -c Release. The temporary probe failed as expected and was removed, so no regression-test PR was opened.Current compiler proof from built
fsiand#version;;:F# Interactive version 15.2.200.0 for F# 11.2 FSharp.Core version 11.0.0.0 .NET Runtime version 11.0.0-rc.1.26420.103 Linux x64This remains an open FCS completion bug rather than Visual Studio-specific behavior.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
southcentralus0.in.applicationinsights.azure.com
To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:network: allowed: - defaults - "southcentralus0.in.applicationinsights.azure.com"
See Network Configuration for more information.
Generated by 🌈 Repo Assist, see workflow run. Learn more.
Add this agentic workflows to your repo
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/repo-assist.md@7c7feb61a52b662eb2089aa2945588b7a200d404closing old issue. using VS code now. not VS anymore
actually, if it is in FCS , keep it open
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone


When binding values to names in pattern matching autocompletion gets triggered but should not.
•in this case autocompletion is not desired:

(update: DU and Enums are an exception to that as mentioned by @rojepp below)
•nor is autocompletion desired in this case:

•however when matching on types autocompletion might be desired:

As expected, autocompletion is not triggerd when binding a values to name with
letorfun.Microsoft Visual Studio Community 2017
Version 15.8.2
VisualStudio.15.Release/15.8.2+28010.2016
Microsoft .NET Framework
Version 4.7.03062
Visual F# Tools 10.2 for F# 4.5 15.8.0.0. Commit Hash: c55dd2c.
Microsoft Visual F# Tools 10.2 for F# 4.5