Skip to content

Conversation

@nojaf
Copy link
Contributor

@nojaf nojaf commented Jun 1, 2023

As discussed on the F# Foundation Slack, there are instances when the GetSymbolUseAtLocation function may return multiple correct symbols for a given line and end column. However, it currently only returns the first symbol in a somewhat arbitrary manner.

To address this limitation, I believe it would be beneficial to introduce an API that allows developers to filter out the symbol they specifically require, based on custom logic tailored to their use case.

In order to demonstrate the scenarios where this issue can arise, I have included two tests that highlight such situations. At present, the only available alternative is to retrieve all symbols, which can be quite inconvenient, particularly for larger files.

@nojaf nojaf requested a review from a team as a code owner June 1, 2023 07:58
@T-Gro
Copy link
Member

T-Gro commented Jun 1, 2023

Now you can also change the single-case GetSymbolUseAtLocation to call into your new method and then convert via List.tryHead, or?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants