Skip to content

Commit d3c224b

Browse files
committed
RequirementMachine: RewriteSystem::hadError() should ignore rules outside our minimization domain
1 parent a57a418 commit d3c224b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/AST/RequirementMachine/HomotopyReduction.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,12 +775,17 @@ void RewriteSystem::minimizeRewriteSystem() {
775775
}
776776

777777
/// In a conformance-valid rewrite system, any rule with unresolved symbols on
778-
/// the left or right hand side should have been simplified by another rule.
778+
/// the left or right hand side should be redundant. The presence of unresolved
779+
/// non-redundant rules means one of the original requirements written by the
780+
/// user was invalid.
779781
bool RewriteSystem::hadError() const {
780782
assert(Complete);
781783
assert(Minimized);
782784

783785
for (const auto &rule : Rules) {
786+
if (!isInMinimizationDomain(rule.getLHS().getRootProtocol()))
787+
continue;
788+
784789
if (rule.isPermanent())
785790
continue;
786791

0 commit comments

Comments
 (0)