FindReferencesInFile
misses references to type when a module with the same name exists
#14411
Labels
Area-LangService-FindAllReferences
Find all references across projects and solutions
Bug
Impact-Medium
(Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone
Repro steps
Code sample 1
Code sample 2
type MyType
Expected behavior
In both code samples we get the same results - 2 references to
MyType
type.Actual behavior
In code sample 2 the second reference (
y
) is missing.Known workarounds
None
Related information
The second occurrence is incorrectly stored in
ItemKeyStore
asItem.ModuleOrNamespaces
instead ofItem.Types
. This happens probably because in name resolution we find the identifier in modules, which are searched first.fsharp/src/Compiler/Checking/NameResolution.fs
Line 3085 in 8e3b97b
The text was updated successfully, but these errors were encountered: