`BasicFormat` cannot indent closure body in tuple
Opened this issue · 1 comments
stevapple commented
Description
BasicFormat
cannot indent the closure body when it's nested in a LabeledExprSyntax
.
Steps to Reproduce
let builder = ExprSyntax(
"""
.init(
name: {
if let name {
return name
} else {
return "John"
}
}()
)
"""
)
assertBuildResult(
builder,
"""
.init(
name: {
if let name {
return name
} else {
return "John"
}
}()
)
"""
)
outputs:
Actual output (+) differed from expected output (-):
.init(
name: {
– if let name {
– return name
– } else {
– return "John"
– }
+ if let name {
+ return name
+ } else {
+ return "John"
+ }
}()
)
ahoppen commented
Tracked in Apple’s issue tracker as rdar://114137999