@@ -1752,7 +1752,7 @@ extension SourceKitServer {
1752
1752
}
1753
1753
guard let usr = symbol. usr else { return [ ] }
1754
1754
logger. info ( " performing indexed jump-to-def with usr \( usr) " )
1755
- var occurrences = index. definitionOrDeclarationOccurances ( ofUSR: usr)
1755
+ var occurrences = index. definitionOrDeclarationOccurrences ( ofUSR: usr)
1756
1756
if symbol. isDynamic ?? true {
1757
1757
lazy var transitiveReceiverUsrs : [ String ] ? = {
1758
1758
if let receiverUsrs = symbol. receiverUsrs {
@@ -1853,7 +1853,7 @@ extension SourceKitServer {
1853
1853
/// to get to the definition of `symbolUSR`.
1854
1854
///
1855
1855
/// `originatorUri` is the URI of the file from which the definition request is performed. It is used to determine the
1856
- /// compiler arguments to generate the generated inteface .
1856
+ /// compiler arguments to generate the generated interface .
1857
1857
func definitionInInterface(
1858
1858
moduleName: String ,
1859
1859
symbolUSR: String ? ,
@@ -1890,12 +1890,12 @@ extension SourceKitServer {
1890
1890
return nil
1891
1891
}
1892
1892
guard let usr = symbol. usr else { return nil }
1893
- var occurrances = index. occurrences ( ofUSR: usr, roles: . baseOf)
1894
- if occurrances . isEmpty {
1895
- occurrances = index. occurrences ( relatedToUSR: usr, roles: . overrideOf)
1893
+ var occurrences = index. occurrences ( ofUSR: usr, roles: . baseOf)
1894
+ if occurrences . isEmpty {
1895
+ occurrences = index. occurrences ( relatedToUSR: usr, roles: . overrideOf)
1896
1896
}
1897
1897
1898
- return . locations( occurrances . compactMap { indexToLSPLocation ( $0. location) } )
1898
+ return . locations( occurrences . compactMap { indexToLSPLocation ( $0. location) } )
1899
1899
}
1900
1900
1901
1901
func references(
@@ -1963,20 +1963,20 @@ extension SourceKitServer {
1963
1963
1964
1964
// Only return a single call hierarchy item. Returning multiple doesn't make sense because they will all have the
1965
1965
// same USR (because we query them by USR) and will thus expand to the exact same call hierarchy.
1966
- // Also, VS Code doesn't seem to like multiple call hiearchy items being returned and fails to display any results
1966
+ // Also, VS Code doesn't seem to like multiple call hierarchy items being returned and fails to display any results
1967
1967
// if they are, failing with `Cannot read properties of undefined (reading 'map')`.
1968
1968
guard let definition = index. definitionOrDeclarationOccurrences ( ofUSR: usr) . first else {
1969
1969
return nil
1970
1970
}
1971
1971
guard let location = indexToLSPLocation ( definition. location) else {
1972
1972
return nil
1973
1973
}
1974
- let callHierachyItem = self . indexToLSPCallHierarchyItem (
1974
+ let callHierarchyItem = self . indexToLSPCallHierarchyItem (
1975
1975
symbol: definition. symbol,
1976
1976
moduleName: definition. location. moduleName,
1977
1977
location: location
1978
1978
)
1979
- return [ callHierachyItem ]
1979
+ return [ callHierarchyItem ]
1980
1980
}
1981
1981
1982
1982
/// Extracts our implementation-specific data about a call hierarchy
@@ -2343,8 +2343,8 @@ fileprivate func transitiveSubtypeClosure(ofUsrs usrs: [String], index: IndexSto
2343
2343
var result : [ String ] = [ ]
2344
2344
for usr in usrs {
2345
2345
result. append ( usr)
2346
- let directSubtypes = index. occurrences ( ofUSR: usr, roles: . baseOf) . flatMap { occurance in
2347
- occurance . relations. filter { $0. roles. contains ( . baseOf) } . map ( \. symbol. usr)
2346
+ let directSubtypes = index. occurrences ( ofUSR: usr, roles: . baseOf) . flatMap { occurrence in
2347
+ occurrence . relations. filter { $0. roles. contains ( . baseOf) } . map ( \. symbol. usr)
2348
2348
}
2349
2349
let transitiveSubtypes = transitiveSubtypeClosure ( ofUsrs: directSubtypes, index: index)
2350
2350
result += transitiveSubtypes
0 commit comments