File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Sources/SourceKitLSP/Swift Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -171,10 +171,11 @@ fileprivate final class DocumentSymbolsFinder: SyntaxAnyVisitor {
171
171
}
172
172
173
173
override func visit( _ node: DeinitializerDeclSyntax ) -> SyntaxVisitorContinueKind {
174
+ // LSP doesn't have a destructor kind. constructor is the closest match and also what clangd for destructors.
174
175
return record (
175
176
node: node,
176
177
name: node. deinitKeyword. text,
177
- symbolKind: . null ,
178
+ symbolKind: . constructor ,
178
179
range: node. rangeWithoutTrivia,
179
180
selection: node. deinitKeyword. rangeWithoutTrivia
180
181
)
Original file line number Diff line number Diff line change @@ -748,7 +748,7 @@ final class DocumentSymbolTests: XCTestCase {
748
748
children: [
749
749
DocumentSymbol (
750
750
name: " deinit " ,
751
- kind: . null ,
751
+ kind: . constructor ,
752
752
range: positions [ " 4️⃣ " ] ..< positions [ " 6️⃣ " ] ,
753
753
selectionRange: positions [ " 4️⃣ " ] ..< positions [ " 5️⃣ " ] ,
754
754
children: [ ]
You can’t perform that action at this time.
0 commit comments