[AST] NFC: Introduce PrintOptions::forDebugging

This commit is contained in:
Hamish Knight
2025-09-21 23:19:06 +01:00
parent 4183eca16c
commit 3141b5a8cd
14 changed files with 66 additions and 109 deletions

View File

@@ -13439,12 +13439,9 @@ retry_after_fail:
// If we have a common result type, bind the expected result type to it.
if (commonResultType && !commonResultType->is<ErrorType>()) {
if (isDebugMode()) {
PrintOptions PO;
PO.PrintTypesForDebugging = true;
llvm::errs().indent(solverState ? solverState->getCurrentIndent() : 0)
<< "(common result type for $T" << fnTypeVar->getID() << " is "
<< commonResultType.getString(PO)
<< ")\n";
<< "(common result type for $T" << fnTypeVar->getID() << " is "
<< commonResultType.getString(PrintOptions::forDebugging()) << ")\n";
}
// Introduction of a `Bind` constraint here could result in the disconnect