Skip to content

Commit dd07194

Browse files
committed
Fix that variables with accessors are not used as focused code context
1 parent fd54931 commit dd07194

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tool/Sources/FocusedCodeFinder/Swift/SwiftFocusedCodeFinder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public class SwiftFocusedCodeFinder: KnownLanguageFocusedCodeFinder<
187187
.split(omittingEmptySubsequences: false, whereSeparator: \.isNewline)
188188
.joined(separator: " "),
189189
name: name,
190-
canBeUsedAsCodeRange: false
190+
canBeUsedAsCodeRange: node.bindings.first?.accessorBlock != nil
191191
)
192192

193193
case let node as AccessorDeclSyntax:

0 commit comments

Comments
 (0)