We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
enum MyEnum { case a case b } let myEnum = MyEnum.a let test: Int = { switch myEnum { case .a: return 0 case .b: return 1 } }()
After bumping to 5.9, disabling redundantReturn and running swiftformat, we get...
enum MyEnum { case a case b } let myEnum = MyEnum.a let test: Int = switch myEnum { case .a: return 0 case .b: return 1 }
which is an error, Cannot 'return' in 'switch' when used as expression
The text was updated successfully, but these errors were encountered:
Here's a fix: #1567
Sorry, something went wrong.
@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
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: