Closed yonaskolb closed 10 months ago
Using SwiftFormat 0.52.4 with swiftversion set to 5.9, and the redundantReturn rule.
swiftversion
redundantReturn
SwiftFormat incorrectly removes the return here leading to a compiler error 'nil' requires a contextual type
'nil' requires a contextual type
init?(optionalHex: String?) { if let optionalHex { self.init(hex: optionalHex) } else { - return nil + nil } }
Will be removing this code anyway, as it serves no real purpose, but wanted to open an issue to let you know
@yonaskolb fixed in 0.52.5. Thanks for the report!
Using SwiftFormat 0.52.4 with
swiftversion
set to 5.9, and theredundantReturn
rule.SwiftFormat incorrectly removes the return here leading to a compiler error
'nil' requires a contextual type
Will be removing this code anyway, as it serves no real purpose, but wanted to open an issue to let you know