Skip to content

Commit 254bd82

Browse files
author
Amritpan Kaur
committed
[CSStep] Fix type variable printing inconsistency.
1 parent e8b840c commit 254bd82

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/Sema/CSBindings.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,8 +1655,6 @@ void BindingSet::dump(llvm::raw_ostream &out, unsigned indent) const {
16551655
PrintOptions PO;
16561656
PO.PrintTypesForDebugging = true;
16571657

1658-
out.indent(indent);
1659-
out << "(";
16601658
if (auto typeVar = getTypeVariable()) {
16611659
typeVar->print(out, PO);
16621660
out << " ";
@@ -1813,7 +1811,7 @@ void BindingSet::dump(llvm::raw_ostream &out, unsigned indent) const {
18131811
}
18141812
out << "]";
18151813
}
1816-
out << ")";
1814+
18171815
}
18181816

18191817
// Given a possibly-Optional type, return the direct superclass of the

lib/Sema/CSStep.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,10 @@ StepResult ComponentStep::take(bool prevFailed) {
351351

352352
auto bestBindings = CS.determineBestBindings([&](const BindingSet &bindings) {
353353
if (CS.isDebugMode() && bindings.hasViableBindings()) {
354+
bos.indent(CS.solverState->getCurrentIndent() + 2);
355+
bos << "(";
354356
bindings.dump(bos, CS.solverState->getCurrentIndent() + 2);
355-
bos << "\n";
357+
bos << ")\n";
356358
}
357359
});
358360

0 commit comments

Comments
 (0)