We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f26d02 commit ad31fa3Copy full SHA for ad31fa3
lib/AST/ASTPrinter.cpp
@@ -5552,9 +5552,8 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
5552
}
5553
5554
void visitPackExpansionType(PackExpansionType *T) {
5555
- Printer << "(";
5556
visit(T->getPatternType());
5557
- Printer << "..." << ")";
+ Printer << "...";
5558
5559
5560
void visitTupleType(TupleType *T) {
@@ -5563,7 +5562,8 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
5563
5562
5564
// Single-element tuples can only appear in SIL mode.
5565
if (T->getNumElements() == 1 &&
5566
- !T->getElement(0).hasName()) {
+ !T->getElement(0).hasName() &&
+ !T->getElementType(0)->is<PackExpansionType>()) {
5567
Printer << "@tuple ";
5568
5569
0 commit comments