Skip to content

Conversation

@luoliwoshang
Copy link
Member

@luoliwoshang luoliwoshang commented Apr 29, 2024

#269

support

  • cross package find overload declaration reference
  • same package find overload declaration reference

Implementation details:
https://m1utligoytg.feishu.cn/wiki/QSzVwgWGaiwF6Ak8kL1cNc5mn6d?from=from_copylink

image

  • Wait for the above PR to merge, then modify the gop version in tools.
    Support for overload function find references

Option 1

Multiple overloaded functions corresponding to use ident are stored in the TypeInfo of Go+, so in the search of reference, it is determined whether the type corresponding to the Ident calling the overloaded function is a function type of the overloaded function. If it is one of the overloaded functions, then according to the name of the overloaded function, the declaration of the overloaded function is obtained and replaced with the object compared with target, that is, the overloaded function corresponding to the overloaded declaration can be found.

Defect

TypeInfo does not directly store the types declared by Overload functions corresponding to Ident, but stores multiple overloaded function members corresponding to Ident, resulting in redundant logic

Improve

Modify the typesutil.Overloads from multiple overloaded members corresponding to Ident to the corresponding overloaded declaration, and provide a function to obtain the actual overloaded member function corresponding to the Ident

@luoliwoshang luoliwoshang changed the title update:support overload function reference Apr 29, 2024
@luoliwoshang luoliwoshang force-pushed the overload-reference branch 3 times, most recently from 11c9d16 to 107171f Compare April 30, 2024 03:09
@luoliwoshang luoliwoshang force-pushed the overload-reference branch from f310120 to 1daaeb5 Compare May 3, 2024 08:35
@luoliwoshang luoliwoshang changed the title [WIP] update:support overload function reference May 3, 2024
@luoliwoshang luoliwoshang changed the title update:support overload function reference May 8, 2024
@luoliwoshang luoliwoshang changed the title update:support overload decl reference May 8, 2024
@luoliwoshang luoliwoshang force-pushed the overload-reference branch 3 times, most recently from ffe6f59 to cdfc8e7 Compare May 27, 2024 07:38
@luoliwoshang
Copy link
Member Author

support fine overload decl cross package reference in 0ddf32a

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

Labels

None yet

2 participants