Skip to content

Commit 88cbcea

Browse files
committed
Add a regression test for SR-8469 / rdar://43888895
1 parent 21b5326 commit 88cbcea

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// RUN: %target-swift-frontend -emit-ir %s
2+
3+
final class Baz {}
4+
5+
final class Bar {
6+
private let x: Baz
7+
init(x: Baz) {
8+
self.x = x
9+
}
10+
}
11+
12+
final class Foo {
13+
private var bar: Bar?
14+
15+
private func navigate(with baz: Baz?) {
16+
bar = nil
17+
guard let baz = baz else { return }
18+
let bar = Bar(x: baz)
19+
self.bar = bar
20+
}
21+
}

0 commit comments

Comments
 (0)