Skip to content

Commit d96fea5

Browse files
[5.5-05142021] Fix ClassDecl::isRootDefaultActor to use the maximal resilience expansion (#37786)
Otherwise, we fail to emit default actor layout fields and intialization and deintialization routine calls. Meaning that actors in resilient libraries are broken. rdar://78622313
1 parent 3177b7f commit d96fea5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8093,7 +8093,7 @@ bool ClassDecl::hasExplicitCustomActorMethods() const {
80938093
}
80948094

80958095
bool ClassDecl::isRootDefaultActor() const {
8096-
return isRootDefaultActor(getModuleContext(), ResilienceExpansion::Minimal);
8096+
return isRootDefaultActor(getModuleContext(), ResilienceExpansion::Maximal);
80978097
}
80988098

80998099
bool ClassDecl::isRootDefaultActor(ModuleDecl *M,

test/IRGen/actor_class.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-swift-frontend -emit-ir %s -swift-version 5 -enable-experimental-concurrency | %IRGenFileCheck %s
2+
// RUN: %target-swift-frontend -enable-library-evolution -emit-ir %s -swift-version 5 -enable-experimental-concurrency | %IRGenFileCheck %s
23
// REQUIRES: concurrency
34

45

0 commit comments

Comments
 (0)