mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #62053 from abdulowork/improve-type-checker-debugging-indentation
Improve indentation in type checker debugging output
This commit is contained in:
@@ -3954,7 +3954,7 @@ SolutionResult ConstraintSystem::salvage() {
|
||||
int i = 0;
|
||||
for (auto &solution : viable) {
|
||||
log << "---Ambiguous solution #" << i++ << "---\n";
|
||||
solution.dump(log);
|
||||
solution.dump(log, solverState->getCurrentIndent());
|
||||
log << "\n";
|
||||
}
|
||||
}
|
||||
@@ -4688,13 +4688,15 @@ bool ConstraintSystem::diagnoseAmbiguityWithFixes(
|
||||
return true;
|
||||
|
||||
if (isDebugMode()) {
|
||||
auto &log = llvm::errs();
|
||||
auto indent = solverState->getCurrentIndent();
|
||||
auto &log = llvm::errs().indent(indent);
|
||||
log << "--- Ambiguity: Considering #" << solutions.size()
|
||||
<< " solutions with fixes ---\n";
|
||||
int i = 0;
|
||||
for (auto &solution : solutions) {
|
||||
log << "\n--- Solution #" << i++ << "---\n";
|
||||
solution.dump(log);
|
||||
log << "\n";
|
||||
log.indent(indent) << "--- Solution #" << i++ << "---\n";
|
||||
solution.dump(log, indent);
|
||||
log << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user