File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
lib/AST/RequirementMachine Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -684,6 +684,22 @@ void RewriteSystem::minimizeRewriteSystem() {
684
684
else
685
685
break ;
686
686
}
687
+
688
+ // Assert if homotopy reduction failed to eliminate a redundant conformance,
689
+ // since this suggests a misunderstanding on my part.
690
+ for (unsigned ruleID : redundantConformances) {
691
+ const auto &rule = getRule (ruleID);
692
+ assert (rule.isProtocolConformanceRule () &&
693
+ " Redundant conformance is not a conformance rule?" );
694
+
695
+ if (!rule.isRedundant ()) {
696
+ llvm::errs () << " Homotopy reduction did not eliminate redundant "
697
+ << " conformance?\n " ;
698
+ llvm::errs () << " (#" << ruleID << " ) " << rule << " \n\n " ;
699
+ dump (llvm::errs ());
700
+ abort ();
701
+ }
702
+ }
687
703
}
688
704
689
705
// / Verify that each 3-cell is a valid loop around its basepoint.
You can’t perform that action at this time.
0 commit comments