nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.62k stars 623 forks source link

spaceAroundOperators false positive with @MainActor and @Sendable #1698

Closed brzzdev closed 1 month ago

brzzdev commented 1 month ago

Given let example = Example<(@MainActor () -> Void)?>(nil) or let example = Example<(@Sendable () -> Void)?>(nil) then spaceAroundOperators will change these to let example = Example < (@MainActor () -> Void)?> nil let example = Example < (@Sendable () -> Void)?> nil which is then an error in Xcode.

let example = Example<(() -> Void)?> doesn't have this issue.

nicklockwood commented 1 month ago

@brzzdev fixed in 0.53.10