Closed JOyo246 closed 8 months ago
Here's a fix: https://github.com/nicklockwood/SwiftFormat/pull/1567
@calda oh ha ha, I was just finishing up my own fix 🤦♂️
I think I prefer my approach, but I'll steal your test suite - thanks!
Haha, thats funny, np! Will be interested to see your approach
@JOyo246 fixed in 0.52.9
When bumping our swift version to 5.9, and also disabling redundantReturn, we are seeing a bug with if/switch expressions.
Swift 5.8 Code
After bumping to 5.9, disabling redundantReturn and running swiftformat, we get...
which is an error, Cannot 'return' in 'switch' when used as expression