Two symbols are reported for override property
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 144
Description
Hi there,
I'm not 100% sure this isn't by design and thus *think* it is a bug.
**Repro steps**
Add a test in `tests/service/Symbols.fs`
```fsharp
[]
let ``Override auto property`` () =
let source = """
module T
[]
type NodeBase() =
abstract member Children: int array
type StringNode() =
inherit NodeBase()
override val Children = Array.empty
"""
let _, checkResults = getParseAndCheckResults source
let symbols = checkResults.GetSymbolUsesAtLocation(10, 25, " override val Children = Array.empty", [ "Children" ])
let valSignatureTexts =
symbols
|> List.choose (fun su ->
match su.Symbol with
| :? FSharpMemberOrFunctionOrValue as mfv ->
mfv.GetValSignatureText(su.DisplayContext, su.Range)
| _ -> None
)
ignore valSignatureTexts
```
Provide the steps required to reproduce the problem:
- `checkResults.GetSymbolUsesAtLocation` will return two symbols. Both contain the correct range of the `override` in `StringNode`.

- However, the inner `ValRef` differs for both symbols.


**Expected behaviour**
I only get one symbol in this case. Maybe from the `override` Symbol I can go to the `abstract member Children` one.
**Actual behaviour**
Two symbols are found, leading to

**Known workarounds**
I can filter out the symbol I want by `DisplayName`.
**Related information**
Provide any related information (optional):
main branch at 0dfd880da573fbed6ab1008c9b53cc9aacf39f67
Contributor guide
Assessment
This issue has not been assessed yet.