-
Couldn't load subscription status.
- Fork 664
Closed
Labels
bugfixed in developbug/feature resolved in the develop branchbug/feature resolved in the develop branch
Description
We're adopting the hoistPatternLet rule, with --patternlet inline, and I found a case where it causes a compile failure:
Before
let foo: String? = "foo"
let bar: String? = nil
switch (foo, bar) {
case let (.some(unwrapedFoo), nil):
print(unwrapedFoo)
default:
break
}After running swiftformat . --rules hoistPatternLet --patternlet inline
let foo: String? = "foo"
let bar: String? = nil
switch (foo, bar) {
case (.some(let unwrapedFoo), let nil): // let nil is invalid
print(unwrapedFoo)
default:
break
}Expected
let foo: String? = "foo"
let bar: String? = nil
switch (foo, bar) {
case (.some(let unwrapedFoo), nil):
print(unwrapedFoo)
default:
break
}Metadata
Metadata
Assignees
Labels
bugfixed in developbug/feature resolved in the develop branchbug/feature resolved in the develop branch