Skip to content

Commit dabc5ea

Browse files
committed
Change return type of indented(by:) to Self
1 parent a8e4b65 commit dabc5ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/SwiftBasicFormat/Indenter.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ extension SyntaxProtocol {
1717
/// - Parameter indentFirstLine: Whether the first token of this node should be indented.
1818
/// Pass `true` if you know that this node will be placed at the beginning of a line, even if its
1919
/// current leading trivia does not start with a newline (such as at the very start of a file).
20-
public func indented(by indentation: Trivia, indentFirstLine: Bool = false) -> Syntax {
20+
public func indented(by indentation: Trivia, indentFirstLine: Bool = false) -> Self {
2121
Indenter(indentation: indentation, indentFirstLine: indentFirstLine)
2222
.rewrite(self)
23+
.cast(Self.self)
2324
}
2425
}
2526

0 commit comments

Comments
 (0)