Skip to content

Commit cc98822

Browse files
authored
Merge pull request #76314 from DougGregor/postfix-if-strip-member-expressions
Ensure that #if stripping for postfix expressions works in interface generation
2 parents 44b68cb + 08eefcb commit cc98822

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/ModuleInterface/inlinable-function.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,3 +329,17 @@ public class HasDefaultDeinit {
329329
// CHECK: [[OBJC]]deinit{{$}}
330330
// CHECK-NEXT: }
331331
}
332+
333+
// CHECK: public func testInlinableTextRemovesPostfix()
334+
@inlinable public func testInlinableTextRemovesPostfix() {
335+
// FROMSOURCE: "foobar"
336+
// FROMSOURCE-NOT: .debugDescription
337+
// FROMSOURCE: .description
338+
// FROMSOURCE-NEXT: }
339+
_ = "foobar"
340+
#if DEBUG
341+
.debugDescription
342+
#else
343+
.description
344+
#endif
345+
}

0 commit comments

Comments
 (0)