Skip to content

Commit 4a2269b

Browse files
committed
Sema: Don't ask for stored properties of resilient structs in CircularityChecker::expandNominal()
1 parent 052e79b commit 4a2269b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Sema/TypeCheckCircularity.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,14 @@ bool CircularityChecker::expandTuple(CanTupleType tupleType, unsigned depth) {
232232
/// Visit a nominal type and try to expand it one level.
233233
bool CircularityChecker::expandNominal(CanType type, NominalTypeDecl *D,
234234
unsigned depth) {
235+
if (D->isResilient(OriginalDecl->getParentModule(),
236+
ResilienceExpansion::Maximal)) {
237+
LLVM_DEBUG(llvm::dbgs() << std::string(depth, ' ')
238+
<< "skipping resilient nominal "
239+
<< type << "\n";);
240+
return false;
241+
}
242+
235243
LLVM_DEBUG(llvm::dbgs() << std::string(depth, ' ') << "expanding nominal "
236244
<< type << "\n";);
237245
if (auto S = dyn_cast<StructDecl>(D)) {

0 commit comments

Comments
 (0)