@@ -356,34 +356,38 @@ StepResult ComponentStep::take(bool prevFailed) {
356
356
});
357
357
358
358
auto *disjunction = CS.selectDisjunction ();
359
- auto *conjunction = CS.selectConjunction ();
360
359
361
360
if (CS.isDebugMode ()) {
362
- PrintOptions PO;
363
- PO.PrintTypesForDebugging = true ;
364
-
365
- auto &log = getDebugLogger ();
366
361
if (!potentialBindings.empty ()) {
362
+ auto &log = getDebugLogger ();
367
363
log << " (Potential Binding(s): " << ' \n ' ;
368
364
log << potentialBindings;
369
365
}
370
- log.indent (CS.solverState ->getCurrentIndent ());
371
366
372
- if (disjunction) {
373
- log.indent (2 );
374
- log << " Disjunction(s) = [" ;
367
+ SmallVector<Constraint *, 4 > disjunctions;
368
+ CS.collectDisjunctions (disjunctions);
369
+ std::vector<std::string> overloadDisjunctions;
370
+ for (const auto &disjunction : disjunctions) {
371
+ PrintOptions PO;
372
+ PO.PrintTypesForDebugging = true ;
373
+
375
374
auto constraints = disjunction->getNestedConstraints ();
376
- log << constraints[0 ]->getFirstType ()->getString (PO);
377
- log << " ]" ;
375
+ if (constraints[0 ]->getKind () == ConstraintKind::BindOverload)
376
+ overloadDisjunctions.push_back (
377
+ constraints[0 ]->getFirstType ()->getString (PO));
378
378
}
379
- if (conjunction) {
379
+ if (!overloadDisjunctions.empty ()) {
380
+ auto &log = getDebugLogger ();
380
381
log.indent (2 );
381
- log << " Conjunction(s) = [" ;
382
- auto constraints = conjunction->getNestedConstraints ();
383
- log << constraints[0 ]->getFirstType ()->getString (PO);
384
- log << " ]" ;
382
+ log << " Disjunction(s) = [" ;
383
+ interleave (overloadDisjunctions, log, " , " );
384
+ log << " ]\n " ;
385
+
386
+ if (!potentialBindings.empty () || !overloadDisjunctions.empty ()) {
387
+ auto &log = getDebugLogger ();
388
+ log << " )\n " ;
389
+ }
385
390
}
386
- log << " )\n " ;
387
391
}
388
392
389
393
if (CS.shouldAttemptFixes ()) {
0 commit comments