Change constructor ref node location in Find Refs
Fixes internal issue #1138943. In the SymbolFinder API, references to constructors are included as references to both the constructor method symbol and the related type symbol. Because reference locations are deduplicated across all results shown in Find References, we have to decide which definition node to use as the parent. Prior to this change the first related definition returned to us by the SymbolFinder won, but this ordering was not guaranteed to be consistent. This change introduces a precedence ordering for definitions returned by the SymbolFinder that currently guarantees that members will be preferred over types. Additionally, this change removes the requirement that definitions shown in Find References have distinct locations. This allows us to meaningfully separate references between a type and its default constructor which has the same location.
Showing
想要评论请 注册 或 登录