Skip to content

Commit 49274cc

Browse files
committed
RequirementMachine: Forgot to set ProtocolComponent::InProgress to true
1 parent 74616db commit 49274cc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/AST/RequirementMachine/RewriteContext.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,9 @@ void RewriteContext::getProtocolComponentRec(
626626

627627
/// Lazily construct a requirement machine for the given protocol's strongly
628628
/// connected component (SCC) in the protocol dependency graph.
629+
///
630+
/// This can only be called once, to prevent multiple requirement machines
631+
/// for being built with the same component.
629632
ArrayRef<const ProtocolDecl *> RewriteContext::getProtocolComponent(
630633
const ProtocolDecl *proto) {
631634
auto found = Protos.find(proto);
@@ -650,6 +653,8 @@ ArrayRef<const ProtocolDecl *> RewriteContext::getProtocolComponent(
650653
abort();
651654
}
652655

656+
component.InProgress = true;
657+
653658
return component.Protos;
654659
}
655660

0 commit comments

Comments
 (0)