Skip to content

Commit

Permalink
[Test] Eased check assertion.
Browse files Browse the repository at this point in the history
  • Loading branch information
nate-chandler committed Jan 12, 2022
1 parent add1bbb commit 9b021c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions validation-test/SILOptimizer/lexical-lifetimes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ class FooerAsync {
return do_foo_async {
// At this point, strongSelf is keeping the object alive.
weakSelf?.foo1()
// By this point, strongSelf has been nil'd, dropping the object's retain
// count to 0, deallocating the object, so weakSelf is nil.
// By this point, strongSelf has been nil'd. However, self in the
// enclosing foo() may still be keeping the object alive, depending on how
// the closure was scheduled.
weakSelf?.foo2()
}
}
Expand All @@ -192,7 +193,6 @@ class FooerAsync {
strongSelf = nil
}
func foo2() {
// CHECK-NOT: FooerAsync foo2
print(type(of: self), #function)
}
}
Expand Down

0 comments on commit 9b021c9

Please sign in to comment.