Skip to content

Commit edaf04b

Browse files
committed
Print '@'lifetime(copy x) in the .swiftinterface
1 parent 5d2c829 commit edaf04b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

include/swift/AST/LifetimeDependence.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,15 @@ class LifetimeEntry final
206206
if (!firstElem) {
207207
result += ", ";
208208
}
209-
if (source.getParsedLifetimeDependenceKind() ==
210-
ParsedLifetimeDependenceKind::Scope) {
209+
switch (source.getParsedLifetimeDependenceKind()) {
210+
case ParsedLifetimeDependenceKind::Scope:
211211
result += "borrow ";
212+
break;
213+
case ParsedLifetimeDependenceKind::Inherit:
214+
result += "copy ";
215+
break;
216+
default:
217+
break;
212218
}
213219
result += source.getString();
214220
firstElem = false;

0 commit comments

Comments
 (0)