Skip to content

Commit 58f03af

Browse files
committed
RequirementMachine: Print variadic generic parameter symbols in debug output
1 parent e923e20 commit 58f03af

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

lib/AST/RequirementMachine/RequirementMachine.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,11 @@ void RequirementMachine::dump(llvm::raw_ostream &out) const {
556556
out << " ]";
557557
} else {
558558
out << "fresh signature <";
559-
for (auto paramTy : Params)
560-
out << " " << Type(paramTy);
559+
for (auto paramTy : Params) {
560+
out << " " << paramTy;
561+
if (paramTy->castTo<GenericTypeParamType>()->isTypeSequence())
562+
out << "";
563+
}
561564
out << " >";
562565
}
563566
out << "\n";

lib/AST/RequirementMachine/Symbol.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,9 +675,15 @@ void Symbol::dump(llvm::raw_ostream &out) const {
675675
return;
676676
}
677677

678-
case Kind::GenericParam:
679-
out << Type(getGenericParam());
678+
case Kind::GenericParam: {
679+
auto *gp = getGenericParam();
680+
if (gp->isTypeSequence()) {
681+
out << "(" << Type(gp) << "…)";
682+
} else {
683+
out << Type(gp);
684+
}
680685
return;
686+
}
681687

682688
case Kind::Layout:
683689
out << "[layout: ";

0 commit comments

Comments
 (0)