Hello developers,
there are some issues with conditionalAssignment rule.
Version 0.52.6 / Swift 5.9
It reformats the following code:
let text: String
if conditionOne {
text = "Hello World!"
doSomeStuffHere()
} else {
text = "Goodbye!"
}
to one with errors:
let text: String = if conditionOne {
"Hello World!" // <---- Expression of type `String` is used
doSomeStuffHere()
} else { // <---- Non-expression branch of `if` expression may only end with a `throw`
"Goodbye!"
}
Hello developers, there are some issues with
conditionalAssignment
rule.Version 0.52.6 / Swift 5.9
It reformats the following code:
to one with errors:
Could you please check?
Thank you!