update:support overload anonymous member reference #276
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #269

Old implementation only handled named nodes, didn’t locate
FuncLit
, and didn’t collect anonymous-function targets, so it couldn’t find references to overloaded anonymous functions.Locate the node: Find the AST node at the given cursor position.
New: also treat ast.FuncLit (anonymous functions) as a valid target.
Build targets: Use types.Info to map that node to one or more types.Object, and add any anonymous overload instances for FuncLit into the targets set.
Traverse package ASTs: In parallel, walk every AST node in each package, use types.Info.Uses/Defs to get each node’s types.Object, and compare against targets; report any matches as references.
Implementation details:
https://m1utligoytg.feishu.cn/wiki/QSzVwgWGaiwF6Ak8kL1cNc5mn6d?from=from_copylink