Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/SwiftBasicFormat/BasicFormat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ open class BasicFormat: SyntaxRewriter {
(.regexLiteralPattern, _),
(.regexSlash, .regexPoundDelimiter), // closing extended regex delimiter should never be separate by a space
(.rightAngle, .leftParen), // func foo<T>(x: T)
(.rightAngle, .period), // Foo<T>.bar
(.rightBrace, .leftParen), // { return 1 }()
(.rightParen, .leftParen), // returnsClosure()()
(.rightParen, .period), // foo().bar
Expand Down
7 changes: 7 additions & 0 deletions Tests/SwiftBasicFormatTest/BasicFormatTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -504,4 +504,11 @@ final class BasicFormatTest: XCTestCase {
)
}
}

func testRightAnglePeriodNotFormatted() {
assertFormatted(
tree: ExprSyntax("Foo<T>.bar"),
expected: "Foo<T>.bar"
)
}
}