Skip to content

Commit 0deacdc

Browse files
committed
RequirementMachine: Fix silly typo in RewriteSystem::findRuleToDelete()
This was regressing a couple of validation tests after the seemingly-unrelated introduction of protocol typealias support.
1 parent 5fa5ff7 commit 0deacdc

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

lib/AST/RequirementMachine/HomotopyReduction.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ findRuleToDelete(llvm::function_ref<bool(unsigned)> isRedundantRuleFn) {
454454
// If one of the rules is a concrete type requirement, prefer to
455455
// eliminate the *other* rule.
456456
bool ruleIsConcrete = rule.getLHS().back().hasSubstitutions();
457-
bool otherRuleIsConcrete = otherRule.getRHS().back().hasSubstitutions();
457+
bool otherRuleIsConcrete = otherRule.getLHS().back().hasSubstitutions();
458458

459459
if (ruleIsConcrete != otherRuleIsConcrete) {
460460
if (otherRuleIsConcrete)
@@ -469,20 +469,6 @@ findRuleToDelete(llvm::function_ref<bool(unsigned)> isRedundantRuleFn) {
469469
// Two rules (T.[C] => T) and (T.[C'] => T) are incomparable if
470470
// C and C' are superclass, concrete type or concrete conformance
471471
// symbols.
472-
//
473-
// This should only arise in two limited situations:
474-
// - The new rule was marked invalid due to a conflict.
475-
// - The new rule was substitution-simplified.
476-
//
477-
// In both cases, the new rule becomes the new candidate for
478-
// elimination.
479-
if (!rule.isConflicting() && !rule.isSubstitutionSimplified()) {
480-
llvm::errs() << "Incomparable rules in homotopy reduction:\n";
481-
llvm::errs() << "- Candidate rule: " << rule << "\n";
482-
llvm::errs() << "- Best rule so far: " << otherRule << "\n";
483-
abort();
484-
}
485-
486472
found = pair;
487473
continue;
488474
}

0 commit comments

Comments
 (0)