Properly recurse when removing "unsafe" from inlinable code

I forgot that I have to manually recurse in the syntactic rewriter. Do so.
Fixes rdar://147877042
This commit is contained in:
Doug Gregor
2025-03-25 16:24:23 -07:00
parent a95785c5b2
commit 1b2fad1e78
2 changed files with 7 additions and 3 deletions

View File

@@ -23,7 +23,9 @@ public struct SequenceWithUnsafeIterator: Sequence {
// CHECK-NOT: unsafe
print( unsafe getIntUnsafely())
for unsafe _ in SequenceWithUnsafeIterator() { }
for unsafe _ in SequenceWithUnsafeIterator() {
_ = unsafe getIntUnsafely()
}
}
// CHECK: public protocol P