Handle rename decl conflicts when decl file contains no refs
Fixes #2352 This change fixes a rename crash that would occur when a method declaration conflict was introduced in a file with no references to that symbol, but where at least one other document in the same project had a reference to that symbol. When processing an individual project in ResolveConflictsAsync, we start with the full set of documents from _documentsIdsToBeCheckedForConflict related to that project. But, each rename phase can adjust this set of documents (called documentIdsThatGetsAnnotatedAndRenamed locally) to whatever documents are represented by the current set of _conflictLocations, which can exclude the _documentIdOfRenameSymbolDeclaration itself if it contains no references. Now, when documentIdsThatGetsAnnotatedAndRenamed is recalculated we make sure to keep the _documentIdOfRenameSymbolDeclaration in the set if we're processing the project that contains it.
Showing
想要评论请 注册 或 登录