Skip to content

Commit 52b990a

Browse files
committed
Lifetime inference: fix a crash on implicit _modify for subscripts.
Fixes rdar://155976839 (Compiler crash when _modify is not specified for ~Escapable type)
1 parent 60ce851 commit 52b990a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/LifetimeDependence.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,7 @@ class LifetimeDependenceChecker {
13931393
return std::nullopt;
13941394
}
13951395
if (wrappedAccessorKind) {
1396-
auto *var = cast<VarDecl>(accessor->getStorage());
1396+
auto *var = cast<AbstractStorageDecl>(accessor->getStorage());
13971397
for (auto *wrappedAccessor : var->getAllAccessors()) {
13981398
if (wrappedAccessor->isImplicit())
13991399
continue;

0 commit comments

Comments
 (0)