Closed
Description
Description
We've found a series of regressions when building ForInStmtSyntax
, including:
awaitKeyword
is defaulted to.keyword(.await)
instead ofnil
, which is unexpected for most users;BasicFormat
fails to add spacing afterawaitKeyword
.
Steps to Reproduce
let buildable = ForInStmtSyntax(pattern: PatternSyntax("element"), sequenceExpr: ExprSyntax("array")) {
ExprSyntax("print(element)")
}
print(buildable.formatted())
Outputs:
for awaitelement in array {
print(element)
}
Expected:
for element in array {
print(element)
}