Skip to content

Commit ca59ba1

Browse files
author
Amritpan Kaur
committed
[CSStep] List type variables in scope under consideration for each component step.
1 parent 8e9a896 commit ca59ba1

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

lib/Sema/CSStep.h

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,29 @@ class ComponentStep final : public SolverStep {
466466
// to preliminary modify constraint system or log anything.
467467
if (IsSingle)
468468
return;
469-
470-
if (CS.isDebugMode())
471-
getDebugLogger() << "(solving component #" << Index << '\n';
472-
469+
470+
if (CS.isDebugMode()) {
471+
auto &log = getDebugLogger();
472+
log << "(solving component #" << Index << '\n';
473+
}
474+
473475
ComponentScope = std::make_unique<Scope>(*this);
476+
477+
if (CS.isDebugMode()) {
478+
auto &log = getDebugLogger();
479+
log << "Type variables in scope = "
480+
<< "[";
481+
auto typeVars = CS.getTypeVariables();
482+
PrintOptions PO;
483+
PO.PrintTypesForDebugging = true;
484+
interleave(typeVars, [&](TypeVariableType *typeVar) {
485+
Type(typeVar).print(log, PO);
486+
},
487+
[&] {
488+
log << ", ";
489+
});
490+
log << "]" << '\n';
491+
}
474492

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

0 commit comments

Comments
 (0)