Skip to content

Commit 3803767

Browse files
committed
RequirementMachine: Fix logic error in mergeAssociatedTypes()
1 parent ac9a285 commit 3803767

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/AST/RequirementMachine/RewriteSystemCompletion.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,9 @@ Atom RewriteSystem::mergeAssociatedTypes(Atom lhs, Atom rhs) const {
194194
Protos.inheritsFrom(thisProto, newProto));
195195
};
196196

197-
if (std::find_if(protos.begin(), protos.end(), inheritsFrom)
198-
== protos.end()) {
197+
if (std::find_if(minimalProtos.begin(), minimalProtos.end(),
198+
inheritsFrom)
199+
== minimalProtos.end()) {
199200
minimalProtos.push_back(newProto);
200201
}
201202
}

0 commit comments

Comments
 (0)