Skip to content

Commit f69997e

Browse files
authored
Merge pull request #81117 from lorentey/paper-over-a-deserialization-crash
[AST] Temporarily turn off an assert on empty scopeLifetimeParamIndices
2 parents 7f32235 + b7bb2d5 commit f69997e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

include/swift/AST/LifetimeDependence.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,16 @@ class LifetimeDependenceInfo {
220220
targetIndex(targetIndex) {
221221
assert(this->isImmortal() || inheritLifetimeParamIndices ||
222222
scopeLifetimeParamIndices);
223-
// FIXME: This assert can trigger when Optional/Result support ~Escapable use (rdar://147765187)
223+
// FIXME: These asserts can trigger when Optional/Result support ~Escapable use (rdar://147765187)
224224
// assert(!inheritLifetimeParamIndices ||
225225
// !inheritLifetimeParamIndices->isEmpty());
226+
// assert(!scopeLifetimeParamIndices || !scopeLifetimeParamIndices->isEmpty());
226227
if (inheritLifetimeParamIndices && inheritLifetimeParamIndices->isEmpty()) {
227228
inheritLifetimeParamIndices = nullptr;
228229
}
229-
assert(!scopeLifetimeParamIndices || !scopeLifetimeParamIndices->isEmpty());
230+
if (scopeLifetimeParamIndices && scopeLifetimeParamIndices->isEmpty()) {
231+
scopeLifetimeParamIndices = nullptr;
232+
}
230233
assert((!addressableParamIndices
231234
|| !conditionallyAddressableParamIndices
232235
|| conditionallyAddressableParamIndices->isDisjointWith(

0 commit comments

Comments
 (0)