File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
validation-test/SILOptimizer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -181,8 +181,9 @@ class FooerAsync {
181
181
return do_foo_async {
182
182
// At this point, strongSelf is keeping the object alive.
183
183
weakSelf? . foo1 ( )
184
- // By this point, strongSelf has been nil'd, dropping the object's retain
185
- // count to 0, deallocating the object, so weakSelf is nil.
184
+ // By this point, strongSelf has been nil'd. However, self in the
185
+ // enclosing foo() may still be keeping the object alive, depending on how
186
+ // the closure was scheduled.
186
187
weakSelf? . foo2 ( )
187
188
}
188
189
}
@@ -192,7 +193,6 @@ class FooerAsync {
192
193
strongSelf = nil
193
194
}
194
195
func foo2( ) {
195
- // CHECK-NOT: FooerAsync foo2
196
196
print ( type ( of: self ) , #function)
197
197
}
198
198
}
You can’t perform that action at this time.
0 commit comments