Skip to content

Commit 95e5788

Browse files
committed
Fix AST printing of @Lifetime
1 parent 826e891 commit 95e5788

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/swift/AST/LifetimeDependence.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,17 @@ class LifetimeEntry {
177177
result += ": ";
178178
}
179179

180+
bool firstElem = true;
180181
for (auto source : sources) {
182+
if (!firstElem) {
183+
result += ", ";
184+
}
181185
if (source.getParsedLifetimeDependenceKind() ==
182186
ParsedLifetimeDependenceKind::Scope) {
183187
result += "borrow ";
184188
}
185189
result += source.getString();
190+
firstElem = false;
186191
}
187192
result += ")";
188193
return result;

0 commit comments

Comments
 (0)