Skip to content

Commit ad86ec2

Browse files
author
Amritpan Kaur
committed
[CSStep] Add message to list possible type variables that will be attempted next.
1 parent dbfc5e0 commit ad86ec2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/Sema/CSStep.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,21 @@ StepResult ComponentStep::take(bool prevFailed) {
369369
log.indent(2);
370370
log << ")" << '\n';
371371
log.indent(0);
372+
373+
if (CS.getTypeVariables().size() > 1) {
374+
auto &log = getDebugLogger();
375+
log << "(selecting next type variable to attempt from [";
376+
auto typeVars = CS.getTypeVariables();
377+
PrintOptions PO;
378+
PO.PrintTypesForDebugging = true;
379+
interleave(typeVars, [&](TypeVariableType *typeVar) {
380+
Type(typeVar).print(log, PO);
381+
},
382+
[&] {
383+
log << ", ";
384+
});
385+
log << "])" << '\n';
386+
}
372387
}
373388

374389
if (CS.shouldAttemptFixes()) {

0 commit comments

Comments
 (0)