Skip to content

Commit 19ec12e

Browse files
author
Amritpan Kaur
committed
[CSStep] List type variables in scope under consideration for each component step.
1 parent 03e4e5c commit 19ec12e

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

lib/Sema/CSStep.h

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,28 @@ class ComponentStep final : public SolverStep {
467467
if (IsSingle)
468468
return;
469469

470-
if (CS.isDebugMode())
471-
getDebugLogger() << "(solving component #" << Index << '\n';
472-
473470
ComponentScope = std::make_unique<Scope>(*this);
471+
472+
if (CS.isDebugMode()) {
473+
auto &log = getDebugLogger();
474+
log << "(solving component #" << Index << '\n';
475+
476+
log.indent(CS.solverState->depth * 2 + 2);
477+
log << "(type variables in scope = " << "[";
478+
auto typeVars = CS.getTypeVariables();
479+
PrintOptions PO;
480+
PO.PrintTypesForDebugging = true;
481+
interleave(typeVars, [&](TypeVariableType *typeVar) {
482+
Type(typeVar).print(log, PO);
483+
},
484+
[&] {
485+
log << ' ';
486+
});
487+
log << "])" << '\n';
488+
489+
log.indent(CS.solverState->depth * 2 + 2);
490+
log << "(initial state: " << '\n';
491+
}
474492

475493
// If this component has orphaned constraint attached,
476494
// let's return it to the graph.

0 commit comments

Comments
 (0)