Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdd334b2

Browse files
vasily-kirichenkoKevinRansom
authored andcommitted
Remove duplicates from Find usages result (dotnet#2396)
* filter out symbol uses which have the same range, but different occurrence kinds* add a comment
1 parentd824008 commitdd334b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ type internal FSharpFindUsagesService
123123
|> Async.Parallel
124124
|> liftAsync
125125

126-
return symbolUses|> Array.concat
126+
// FCS may return several `FSharpSymbolUse`s for same range, which have different `ItemOccurrence`s (Use, UseInAttribute, UseInType, etc.)
127+
// We don't care about the occurrence type here, so we distinct by range.
128+
return symbolUses|> Array.concat|> Array.distinctBy(fun x-> x.RangeAlternate)
127129
}
128130

129131
for symbolUsein symbolUsesdo

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp