Skip to content

Commit cf1b1ff

Browse files
author
AlexDenisov
authoredMar 20, 2023
Merge pull request #9 from dsp-testing/redsun82/do-not-print-labels-in-function-types
Patch swift to not print labels in function types
2 parents b3493b0 + 4f70a22 commit cf1b1ff

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/lib/AST/ASTPrinter.cpp b/lib/AST/ASTPrinter.cpp
2+
index 31a047bb1f7..63138128e92 100644
3+
--- a/lib/AST/ASTPrinter.cpp
4+
+++ b/lib/AST/ASTPrinter.cpp
5+
@@ -5943,7 +5943,7 @@ public:
6+
PrintAST::PrintRequirements);
7+
Printer << " ";
8+
9+
- visitAnyFunctionTypeParams(T->getParams(), /*printLabels*/true);
10+
+ visitAnyFunctionTypeParams(T->getParams(), /*printLabels*/false);
11+
12+
if (T->hasExtInfo()) {
13+
if (T->isAsync()) {
14+
@@ -6473,7 +6473,7 @@ void AnyFunctionType::printParams(ArrayRef<AnyFunctionType::Param> Params,
15+
ASTPrinter &Printer,
16+
const PrintOptions &PO) {
17+
TypePrinter(Printer, PO).visitAnyFunctionTypeParams(Params,
18+
- /*printLabels*/true);
19+
+ /*printLabels*/false);
20+
}
21+
22+
std::string

0 commit comments

Comments
 (0)
Please sign in to comment.