Skip to content

Commit 1cdfd01

Browse files
authored
Merge pull request #81362 from meg-gupta/enableassert
Remove disabled asserts in LifetimeDependence
2 parents 024dbd0 + 5f0d37c commit 1cdfd01

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

include/swift/AST/LifetimeDependence.h

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -220,16 +220,9 @@ class LifetimeDependenceInfo {
220220
targetIndex(targetIndex) {
221221
assert(this->isImmortal() || inheritLifetimeParamIndices ||
222222
scopeLifetimeParamIndices);
223-
// FIXME: These asserts can trigger when Optional/Result support ~Escapable use (rdar://147765187)
224-
// assert(!inheritLifetimeParamIndices ||
225-
// !inheritLifetimeParamIndices->isEmpty());
226-
// assert(!scopeLifetimeParamIndices || !scopeLifetimeParamIndices->isEmpty());
227-
if (inheritLifetimeParamIndices && inheritLifetimeParamIndices->isEmpty()) {
228-
inheritLifetimeParamIndices = nullptr;
229-
}
230-
if (scopeLifetimeParamIndices && scopeLifetimeParamIndices->isEmpty()) {
231-
scopeLifetimeParamIndices = nullptr;
232-
}
223+
ASSERT(!inheritLifetimeParamIndices ||
224+
!inheritLifetimeParamIndices->isEmpty());
225+
ASSERT(!scopeLifetimeParamIndices || !scopeLifetimeParamIndices->isEmpty());
233226
assert((!addressableParamIndices
234227
|| !conditionallyAddressableParamIndices
235228
|| conditionallyAddressableParamIndices->isDisjointWith(

0 commit comments

Comments
 (0)