Skip to content

Commit 4cd0351

Browse files
committed
[AST] Temporarily turn off minor assert to avoid source compat regression
1 parent 5bc723d commit 4cd0351

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

include/swift/AST/LifetimeDependence.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,12 @@ class LifetimeDependenceInfo {
247247
targetIndex(targetIndex) {
248248
assert(this->isImmortal() || inheritLifetimeParamIndices ||
249249
scopeLifetimeParamIndices);
250-
assert(!inheritLifetimeParamIndices ||
251-
!inheritLifetimeParamIndices->isEmpty());
250+
// FIXME: This assert can trigger when Optional/Result support ~Escapable use (rdar://147765187)
251+
// assert(!inheritLifetimeParamIndices ||
252+
// !inheritLifetimeParamIndices->isEmpty());
253+
if (inheritLifetimeParamIndices && inheritLifetimeParamIndices->isEmpty()) {
254+
inheritLifetimeParamIndices = nullptr;
255+
}
252256
assert(!scopeLifetimeParamIndices || !scopeLifetimeParamIndices->isEmpty());
253257
assert((!addressableParamIndices
254258
|| !conditionallyAddressableParamIndices

0 commit comments

Comments
 (0)