mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Print new type var assigned to generic in overload.
If overload choice has generic param, print type var assigned to generic param.
This commit is contained in:
@@ -3521,10 +3521,28 @@ void ConstraintSystem::resolveOverload(ConstraintLocator *locator,
|
||||
if (isDebugMode()) {
|
||||
PrintOptions PO;
|
||||
PO.PrintTypesForDebugging = true;
|
||||
llvm::errs().indent(solverState ? solverState->getCurrentIndent() : 2)
|
||||
<< "(overload set choice binding "
|
||||
<< boundType->getString(PO) << " := "
|
||||
<< adjustedRefType->getString(PO) << ")\n";
|
||||
|
||||
auto &log = llvm::errs();
|
||||
log.indent(solverState ? solverState->getCurrentIndent() : 2);
|
||||
log << "(overload set choice binding ";
|
||||
boundType->print(log, PO);
|
||||
log << " := ";
|
||||
adjustedRefType->print(log, PO);
|
||||
|
||||
auto openedAtLoc = getOpenedTypes(locator);
|
||||
if (!openedAtLoc.empty()) {
|
||||
log << " [";
|
||||
llvm::interleave(
|
||||
openedAtLoc.begin(), openedAtLoc.end(),
|
||||
[&](OpenedType opened) {
|
||||
opened.second->getImpl().getGenericParameter()->print(log, PO);
|
||||
log << " := ";
|
||||
Type(opened.second).print(log, PO);
|
||||
},
|
||||
[&]() { log << ", "; });
|
||||
log << "]";
|
||||
}
|
||||
log << ")\n";
|
||||
}
|
||||
|
||||
if (auto *decl = choice.getDeclOrNull()) {
|
||||
|
||||
Reference in New Issue
Block a user