We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cc272e commit a643749Copy full SHA for a643749
Sources/SourceKitLSP/SourceKitLSPServer.swift
@@ -2471,7 +2471,11 @@ fileprivate extension CheckedIndex {
2471
/// If the USR has an ambiguous definition, the most important role of this function is to deterministically return
2472
/// the same result every time.
2473
func primaryDefinitionOrDeclarationOccurrence(ofUSR usr: String) -> SymbolOccurrence? {
2474
- return definitionOrDeclarationOccurrences(ofUSR: usr).sorted().first
+ let result = definitionOrDeclarationOccurrences(ofUSR: usr).sorted().first
2475
+ if result == nil {
2476
+ logger.error("Failed to find definition of \(usr) in index")
2477
+ }
2478
+ return result
2479
}
2480
2481
0 commit comments