nicklockwood / SwiftFormat

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

Update if/switch expression workaround for Swift 5.9 bug to handle `as!` cast #1584

Closed calda closed 8 months ago

calda commented 8 months ago

This PR fixes an issue where conditionalBranchHasUnsupportedCastOperator handled as? casts but not as! casts (which are also unsupported in if/switch expressions in Swift 5.9).

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (a208d66) 95.02% compared to head (2678fd1) 95.01%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1584 +/- ## =========================================== - Coverage 95.02% 95.01% -0.01% =========================================== Files 20 20 Lines 21842 21843 +1 =========================================== - Hits 20755 20754 -1 - Misses 1087 1089 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

nicklockwood commented 8 months ago

Thank you!