dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.94k stars 789 forks source link

Finding references / renaming doesn't work for active patterns in signature files #14969

Open 0101 opened 1 year ago

0101 commented 1 year ago

FSharpChecker.FindBackgroundReferencesInFile doesn't work for active patterns in signature files. It's because they're written into ItemKeyStore as a single Item.Value for all cases with no information about being an active pattern.

They also probably don't get a proper SymbolUse because if you try to rename them you get: image

T-Gro commented 1 year ago

When things are being written out to itemkeystore, do you have the function name available? the one with pipes...

0101 commented 1 year ago

Yeah, I think you have (|A|B|) as displayName and |A|B| as displayNameCore.