Skip to content

Commit 3e9bfa1

Browse files
committed
[SourceKit] Add decl.var.parameters entries to the fully annotated decl
This is the first part of adding parameter substructure so that clients can reason about more of the function declaration. rdar://problem/24292226
1 parent 184efb5 commit 3e9bfa1

File tree

6 files changed

+76
-55
lines changed

6 files changed

+76
-55
lines changed

lib/AST/ASTPrinter.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "swift/Basic/STLExtras.h"
3535
#include "swift/Basic/StringExtras.h"
3636
#include "swift/Parse/Lexer.h"
37+
#include "swift/Basic/Defer.h" // Must come after include of Tokens.def.
3738
#include "swift/Config.h"
3839
#include "swift/Sema/IDETypeChecking.h"
3940
#include "swift/Strings.h"
@@ -1809,6 +1810,11 @@ void PrintAST::visitParamDecl(ParamDecl *decl) {
18091810

18101811
void PrintAST::printOneParameter(const ParamDecl *param, bool Curried,
18111812
bool ArgNameIsAPIByDefault) {
1813+
Printer.callPrintDeclPre(param);
1814+
defer {
1815+
Printer.printDeclPost(param);
1816+
};
1817+
18121818
auto printArgName = [&]() {
18131819
// Print argument name.
18141820
auto ArgName = param->getArgumentName();

lib/IDE/ModuleInterfacePrinting.cpp

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -637,19 +637,29 @@ void ClangCommentPrinter::avoidPrintDeclPost(const Decl *D) {
637637
}
638638

639639
void ClangCommentPrinter::printDeclPre(const Decl *D) {
640-
if (auto ClangN = D->getClangNode()) {
641-
printCommentsUntil(ClangN);
642-
if (shouldPrintNewLineBefore(ClangN)) {
643-
*this << "\n";
644-
printIndent();
640+
// Skip parameters, since we do not gracefully handle nested declarations on a
641+
// single line.
642+
// FIXME: we should fix that, since it also affects struct members, etc.
643+
if (!isa<ParamDecl>(D)) {
644+
if (auto ClangN = D->getClangNode()) {
645+
printCommentsUntil(ClangN);
646+
if (shouldPrintNewLineBefore(ClangN)) {
647+
*this << "\n";
648+
printIndent();
649+
}
650+
updateLastEntityLine(ClangN.getSourceRange().getBegin());
645651
}
646-
updateLastEntityLine(ClangN.getSourceRange().getBegin());
647652
}
648653
return OtherPrinter.printDeclPre(D);
649654
}
650655

651656
void ClangCommentPrinter::printDeclPost(const Decl *D) {
652657
OtherPrinter.printDeclPost(D);
658+
659+
// Skip parameters; see printDeclPre().
660+
if (isa<ParamDecl>(D))
661+
return;
662+
653663
for (auto CommentText : PendingComments) {
654664
*this << " " << ASTPrinter::sanitizeUtf8(CommentText);
655665
}

test/IDE/Inputs/mock-sdk/Foo.annotated.txt

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@
44

55
<decl:Struct>/// Aaa. FooEnum1. Bbb.
66
struct <loc>FooEnum1</loc> : <ref:Protocol>RawRepresentable</ref>, <ref:Protocol>Equatable</ref> {
7-
<decl:Constructor><loc>init(_ rawValue: <ref:Struct>UInt32</ref>)</loc></decl>
8-
<decl:Constructor><loc>init(rawValue: <ref:Struct>UInt32</ref>)</loc></decl>
7+
<decl:Constructor><loc>init(<decl:Param>_ rawValue: <ref:Struct>UInt32</ref></decl>)</loc></decl>
8+
<decl:Constructor><loc>init(<decl:Param>rawValue: <ref:Struct>UInt32</ref></decl>)</loc></decl>
99
<decl:Var>var <loc>rawValue</loc>: <ref:Struct>UInt32</ref></decl>
1010
}</decl>
1111

1212
<decl:Var>/// Aaa. FooEnum1X. Bbb.
1313
var <loc>FooEnum1X</loc>: <ref:Struct>FooEnum1</ref> { get }</decl>
1414
<decl:Struct>struct <loc>FooEnum2</loc> : <ref:Protocol>RawRepresentable</ref>, <ref:Protocol>Equatable</ref> {
15-
<decl:Constructor><loc>init(_ rawValue: <ref:Struct>UInt32</ref>)</loc></decl>
16-
<decl:Constructor><loc>init(rawValue: <ref:Struct>UInt32</ref>)</loc></decl>
15+
<decl:Constructor><loc>init(<decl:Param>_ rawValue: <ref:Struct>UInt32</ref></decl>)</loc></decl>
16+
<decl:Constructor><loc>init(<decl:Param>rawValue: <ref:Struct>UInt32</ref></decl>)</loc></decl>
1717
<decl:Var>var <loc>rawValue</loc>: <ref:Struct>UInt32</ref></decl>
1818
}</decl>
1919
<decl:Var>var <loc>FooEnum2X</loc>: <ref:Struct>FooEnum2</ref> { get }</decl>
2020
<decl:Var>var <loc>FooEnum2Y</loc>: <ref:Struct>FooEnum2</ref> { get }</decl>
2121
<decl:Struct>struct <loc>FooEnum3</loc> : <ref:Protocol>RawRepresentable</ref>, <ref:Protocol>Equatable</ref> {
22-
<decl:Constructor><loc>init(_ rawValue: <ref:Struct>UInt32</ref>)</loc></decl>
23-
<decl:Constructor><loc>init(rawValue: <ref:Struct>UInt32</ref>)</loc></decl>
22+
<decl:Constructor><loc>init(<decl:Param>_ rawValue: <ref:Struct>UInt32</ref></decl>)</loc></decl>
23+
<decl:Constructor><loc>init(<decl:Param>rawValue: <ref:Struct>UInt32</ref></decl>)</loc></decl>
2424
<decl:Var>var <loc>rawValue</loc>: <ref:Struct>UInt32</ref></decl>
2525
}</decl>
2626
<decl:Var>var <loc>FooEnum3X</loc>: <ref:Struct>FooEnum3</ref> { get }</decl>
2727
<decl:Var>var <loc>FooEnum3Y</loc>: <ref:Struct>FooEnum3</ref> { get }</decl>
2828

2929
<decl:Enum>/// Aaa. FooComparisonResult. Bbb.
3030
enum <loc>FooComparisonResult</loc> : <ref:Struct>Int</ref> {
31-
<decl:Constructor><loc>init?(rawValue: <ref:Struct>Int</ref>)</loc></decl>
31+
<decl:Constructor><loc>init?(<decl:Param>rawValue: <ref:Struct>Int</ref></decl>)</loc></decl>
3232
<decl:Var>var <loc>rawValue</loc>: <ref:Struct>Int</ref> { get }</decl>
3333
<decl:EnumElement>case <loc>OrderedAscending</loc></decl>
3434
<decl:EnumElement>case <loc>OrderedSame</loc></decl>
@@ -37,7 +37,7 @@ enum <loc>FooComparisonResult</loc> : <ref:Struct>Int</ref> {
3737

3838
<decl:Struct>/// Aaa. FooRuncingOptions. Bbb.
3939
struct <loc>FooRuncingOptions</loc> : <ref:Protocol>OptionSetType</ref> {
40-
<decl:Constructor><loc>init(rawValue: <ref:Struct>Int</ref>)</loc></decl>
40+
<decl:Constructor><loc>init(<decl:Param>rawValue: <ref:Struct>Int</ref></decl>)</loc></decl>
4141
<decl:Var>let <loc>rawValue</loc>: <ref:Struct>Int</ref></decl>
4242
<decl:Var>static var <loc>EnableMince</loc>: <ref:Struct>FooRuncingOptions</ref> { get }</decl>
4343
<decl:Var>static var <loc>EnableQuince</loc>: <ref:Struct>FooRuncingOptions</ref> { get }</decl>
@@ -46,20 +46,20 @@ struct <loc>FooRuncingOptions</loc> : <ref:Protocol>OptionSetType</ref> {
4646
<decl:Var>var <loc>x</loc>: <ref:Struct>Int32</ref></decl>
4747
<decl:Var>var <loc>y</loc>: <ref:Struct>Double</ref></decl>
4848
<decl:Constructor><loc>init()</loc></decl>
49-
<decl:Constructor><loc>init(x: <ref:Struct>Int32</ref>, y: <ref:Struct>Double</ref>)</loc></decl>
49+
<decl:Constructor><loc>init(<decl:Param>x: <ref:Struct>Int32</ref></decl>, <decl:Param>y: <ref:Struct>Double</ref></decl>)</loc></decl>
5050
}</decl>
5151
<decl:Struct>struct <loc>FooStruct2</loc> {
5252
<decl:Var>var <loc>x</loc>: <ref:Struct>Int32</ref></decl>
5353
<decl:Var>var <loc>y</loc>: <ref:Struct>Double</ref></decl>
5454
<decl:Constructor><loc>init()</loc></decl>
55-
<decl:Constructor><loc>init(x: <ref:Struct>Int32</ref>, y: <ref:Struct>Double</ref>)</loc></decl>
55+
<decl:Constructor><loc>init(<decl:Param>x: <ref:Struct>Int32</ref></decl>, <decl:Param>y: <ref:Struct>Double</ref></decl>)</loc></decl>
5656
}</decl>
5757
<decl:TypeAlias>typealias <loc>FooStructTypedef1</loc> = <ref:Struct>FooStruct2</ref></decl>
5858
<decl:Struct>struct <loc>FooStructTypedef2</loc> {
5959
<decl:Var>var <loc>x</loc>: <ref:Struct>Int32</ref></decl>
6060
<decl:Var>var <loc>y</loc>: <ref:Struct>Double</ref></decl>
6161
<decl:Constructor><loc>init()</loc></decl>
62-
<decl:Constructor><loc>init(x: <ref:Struct>Int32</ref>, y: <ref:Struct>Double</ref>)</loc></decl>
62+
<decl:Constructor><loc>init(<decl:Param>x: <ref:Struct>Int32</ref></decl>, <decl:Param>y: <ref:Struct>Double</ref></decl>)</loc></decl>
6363
}</decl>
6464

6565
<decl:TypeAlias>/// Aaa. FooTypedef1. Bbb.
@@ -69,11 +69,11 @@ typealias <loc>FooTypedef1</loc> = <ref:Struct>Int32</ref></decl>
6969
var <loc>fooIntVar</loc>: <ref:Struct>Int32</ref></decl>
7070

7171
<decl:Func>/// Aaa. fooFunc1. Bbb.
72-
func <loc>fooFunc1(a: <ref:Struct>Int32</ref>)</loc> -> <ref:Struct>Int32</ref></decl>
73-
<decl:Func>func <loc>fooFunc1AnonymousParam(_: <ref:Struct>Int32</ref>)</loc> -> <ref:Struct>Int32</ref></decl>
74-
<decl:Func>func <loc>fooFunc3(a: <ref:Struct>Int32</ref>, _ b: <ref:Struct>Float</ref>, _ c: <ref:Struct>Double</ref>, _ d: <ref:Struct>UnsafeMutablePointer</ref><<ref:Struct>Int32</ref>>)</loc> -> <ref:Struct>Int32</ref></decl>
75-
<decl:Func>func <loc>fooFuncWithBlock(blk: ((<ref:Struct>Float</ref>) -> <ref:Struct>Int32</ref>)!)</loc></decl>
76-
<decl:Func>func <loc>fooFuncWithFunctionPointer(fptr: (@convention(c) (<ref:Struct>Float</ref>) -> <ref:Struct>Int32</ref>)!)</loc></decl>
72+
func <loc>fooFunc1(<decl:Param>a: <ref:Struct>Int32</ref></decl>)</loc> -> <ref:Struct>Int32</ref></decl>
73+
<decl:Func>func <loc>fooFunc1AnonymousParam(<decl:Param>_: <ref:Struct>Int32</ref></decl>)</loc> -> <ref:Struct>Int32</ref></decl>
74+
<decl:Func>func <loc>fooFunc3(<decl:Param>a: <ref:Struct>Int32</ref></decl>, <decl:Param>_ b: <ref:Struct>Float</ref></decl>, <decl:Param>_ c: <ref:Struct>Double</ref></decl>, <decl:Param>_ d: <ref:Struct>UnsafeMutablePointer</ref><<ref:Struct>Int32</ref>></decl>)</loc> -> <ref:Struct>Int32</ref></decl>
75+
<decl:Func>func <loc>fooFuncWithBlock(<decl:Param>blk: ((<ref:Struct>Float</ref>) -> <ref:Struct>Int32</ref>)!</decl>)</loc></decl>
76+
<decl:Func>func <loc>fooFuncWithFunctionPointer(<decl:Param>fptr: (@convention(c) (<ref:Struct>Float</ref>) -> <ref:Struct>Int32</ref>)!</decl>)</loc></decl>
7777
<decl:Func>@noreturn func <loc>fooFuncNoreturn1()</loc></decl>
7878
<decl:Func>@noreturn func <loc>fooFuncNoreturn2()</loc></decl>
7979

@@ -111,9 +111,9 @@ func <loc>fooFuncWithComment4()</loc></decl>
111111
func <loc>fooFuncWithComment5()</loc></decl>
112112

113113
<decl:Func>/// Aaa. redeclaredInMultipleModulesFunc1. Bbb.
114-
func <loc>redeclaredInMultipleModulesFunc1(a: <ref:Struct>Int32</ref>)</loc> -> <ref:Struct>Int32</ref></decl>
114+
func <loc>redeclaredInMultipleModulesFunc1(<decl:Param>a: <ref:Struct>Int32</ref></decl>)</loc> -> <ref:Struct>Int32</ref></decl>
115115
<decl:Func>@available(*, unavailable, message="Variadic function is unavailable")
116-
func <loc>fooFuncUsingVararg(a: <ref:Struct>Int32</ref>, _ varargs: <ref:TypeAlias>Any</ref>...)</loc> -> <ref:Struct>Int32</ref></decl>
116+
func <loc>fooFuncUsingVararg(<decl:Param>a: <ref:Struct>Int32</ref></decl>, <decl:Param>_ varargs: <ref:TypeAlias>Any</ref>...</decl>)</loc> -> <ref:Struct>Int32</ref></decl>
117117

118118
<decl:Protocol>/// Aaa. FooProtocolBase. Bbb.
119119
protocol <loc>FooProtocolBase</loc> {
@@ -141,16 +141,16 @@ protocol <loc>FooProtocolBase</loc> {
141141
<decl:Class>class <loc>FooClassBase</loc> {
142142
<decl:Func>class func <loc>fooBaseInstanceFunc0()</loc></decl>
143143
<decl:Func>func <loc>fooBaseInstanceFunc0()</loc></decl>
144-
<decl:Func>class func <loc>fooBaseInstanceFunc1(anObject: <ref:Protocol>AnyObject</ref>!)</loc> -> <ref:Class>FooClassBase</ref>!</decl>
145-
<decl:Func>func <loc>fooBaseInstanceFunc1(anObject: <ref:Protocol>AnyObject</ref>!)</loc> -> <ref:Class>FooClassBase</ref>!</decl>
144+
<decl:Func>class func <loc>fooBaseInstanceFunc1(<decl:Param>anObject: <ref:Protocol>AnyObject</ref>!</decl>)</loc> -> <ref:Class>FooClassBase</ref>!</decl>
145+
<decl:Func>func <loc>fooBaseInstanceFunc1(<decl:Param>anObject: <ref:Protocol>AnyObject</ref>!</decl>)</loc> -> <ref:Class>FooClassBase</ref>!</decl>
146146
<decl:Constructor><loc>init!()</loc></decl>
147-
<decl:Constructor>convenience <loc>init!(float f: <ref:Struct>Float</ref>)</loc></decl>
147+
<decl:Constructor>convenience <loc>init!(<decl:Param>float f: <ref:Struct>Float</ref></decl>)</loc></decl>
148148
<decl:Func>class func <loc>fooBaseInstanceFuncOverridden()</loc></decl>
149149
<decl:Func>func <loc>fooBaseInstanceFuncOverridden()</loc></decl>
150150
<decl:Func>class func <loc>fooBaseClassFunc0()</loc></decl>
151-
<decl:Constructor>/*not inherited*/ <loc>init!(_ x: <ref:Struct>Int32</ref>)</loc></decl>
151+
<decl:Constructor>/*not inherited*/ <loc>init!(<decl:Param>_ x: <ref:Struct>Int32</ref></decl>)</loc></decl>
152152
<decl:Func>@available(*, unavailable, message="use object construction 'FooClassBase(_:)'")
153-
class func <loc>fooClassBase(x: <ref:Struct>Int32</ref>)</loc> -> <ref:Class>FooClassBase</ref>!</decl>
153+
class func <loc>fooClassBase(<decl:Param>x: <ref:Struct>Int32</ref></decl>)</loc> -> <ref:Class>FooClassBase</ref>!</decl>
154154
}</decl>
155155

156156
<decl:Class>/// Aaa. FooClassDerived. Bbb.
@@ -159,12 +159,12 @@ class <loc>FooClassDerived</loc> : <ref:Class>FooClassBase</ref>, <ref:Protocol>
159159
<decl:Var>var <loc>fooProperty2</loc>: <ref:Struct>Int32</ref></decl>
160160
<decl:Var>var <loc>fooProperty3</loc>: <ref:Struct>Int32</ref> { get }</decl>
161161
<decl:Func>func <loc>fooInstanceFunc0()</loc></decl>
162-
<decl:Func>func <loc>fooInstanceFunc1(a: <ref:Struct>Int32</ref>)</loc></decl>
163-
<decl:Func>func <loc>fooInstanceFunc2(a: <ref:Struct>Int32</ref>, withB b: <ref:Struct>Int32</ref>)</loc></decl>
162+
<decl:Func>func <loc>fooInstanceFunc1(<decl:Param>a: <ref:Struct>Int32</ref></decl>)</loc></decl>
163+
<decl:Func>func <loc>fooInstanceFunc2(<decl:Param>a: <ref:Struct>Int32</ref></decl>, <decl:Param>withB b: <ref:Struct>Int32</ref></decl>)</loc></decl>
164164
<decl:Func>func <loc>fooBaseInstanceFuncOverridden()</loc></decl>
165165
<decl:Func>class func <loc>fooClassFunc0()</loc></decl>
166166
<decl:Constructor><loc>init!()</loc></decl>
167-
<decl:Constructor>convenience <loc>init!(float f: <ref:Struct>Float</ref>)</loc></decl>
167+
<decl:Constructor>convenience <loc>init!(<decl:Param>float f: <ref:Struct>Float</ref></decl>)</loc></decl>
168168

169169
<decl:Func>/// Aaa. fooProtoFunc. Bbb.
170170
/// Ccc.
@@ -193,7 +193,7 @@ class <loc>FooClassDerived</loc> : <ref:Class>FooClassBase</ref>, <ref:Protocol>
193193
<decl:Struct>struct <loc>_InternalStruct</loc> {
194194
<decl:Var>var <loc>x</loc>: <ref:Struct>Int32</ref></decl>
195195
<decl:Constructor><loc>init()</loc></decl>
196-
<decl:Constructor><loc>init(x: <ref:Struct>Int32</ref>)</loc></decl>
196+
<decl:Constructor><loc>init(<decl:Param>x: <ref:Struct>Int32</ref></decl>)</loc></decl>
197197
}</decl>
198198
<decl:Extension>extension <ref:Class><loc>FooClassBase</ref></loc> {
199199
<decl:Func>class func <loc>_internalMeth1()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
@@ -222,12 +222,12 @@ class <loc>FooClassDerived</loc> : <ref:Class>FooClassBase</ref>, <ref:Protocol>
222222
<decl:Var>weak var <loc>weakRef</loc>: @sil_weak <ref:Protocol>AnyObject</ref>!</decl>
223223
<decl:Var>var <loc>scalar</loc>: <ref:Struct>Int32</ref></decl>
224224
<decl:Constructor><loc>init!()</loc></decl>
225-
<decl:Constructor>convenience <loc>init!(float f: <ref:Struct>Float</ref>)</loc></decl>
225+
<decl:Constructor>convenience <loc>init!(<decl:Param>float f: <ref:Struct>Float</ref></decl>)</loc></decl>
226226
}</decl>
227227
<decl:Class>class <loc>FooUnavailableMembers</loc> : <ref:Class>FooClassBase</ref> {
228-
<decl:Constructor>convenience <loc>init!(int i: <ref:Struct>Int32</ref>)</loc></decl>
228+
<decl:Constructor>convenience <loc>init!(<decl:Param>int i: <ref:Struct>Int32</ref></decl>)</loc></decl>
229229
<decl:Func>@available(*, unavailable, message="use object construction 'FooUnavailableMembers(int:)'")
230-
class func <loc>unavailableMembersWithInt(i: <ref:Struct>Int32</ref>)</loc> -> Self!</decl>
230+
class func <loc>unavailableMembersWithInt(<decl:Param>i: <ref:Struct>Int32</ref></decl>)</loc> -> Self!</decl>
231231
<decl:Func>@available(*, unavailable, message="x")
232232
func <loc>unavailable()</loc></decl>
233233
<decl:Func>@available(*, unavailable, message="Not available in Swift")
@@ -251,19 +251,19 @@ class <loc>FooClassDerived</loc> : <ref:Class>FooClassBase</ref>, <ref:Protocol>
251251
<decl:Func>@available(OSX, unavailable, message="x")
252252
func <loc>availabilityUnavailableMsg()</loc></decl>
253253
<decl:Constructor><loc>init!()</loc></decl>
254-
<decl:Constructor>convenience <loc>init!(float f: <ref:Struct>Float</ref>)</loc></decl>
254+
<decl:Constructor>convenience <loc>init!(<decl:Param>float f: <ref:Struct>Float</ref></decl>)</loc></decl>
255255
}</decl>
256256
<decl:Class>class <loc>FooCFType</loc> {
257257
}</decl>
258258
<decl:TypeAlias>@available(*, deprecated, renamed="FooCFType")
259259
typealias <loc>FooCFTypeRef</loc> = <ref:Class>FooCFType</ref></decl>
260260
<decl:Func>@available(*, unavailable, message="Core Foundation objects are automatically memory managed")
261-
func <loc>FooCFTypeRelease(_: <ref:Class>FooCFType</ref>!)</loc></decl>
261+
func <loc>FooCFTypeRelease(<decl:Param>_: <ref:Class>FooCFType</ref>!</decl>)</loc></decl>
262262
<decl:Class>class <loc>FooRepeatedMembers</loc> : <ref:Class>FooClassBase</ref> {
263263
<decl:Func>func <loc>repeatedMethod()</loc></decl>
264264
<decl:Func>func <loc>anotherMethod()</loc></decl>
265265
<decl:Constructor><loc>init!()</loc></decl>
266-
<decl:Constructor>convenience <loc>init!(float f: <ref:Struct>Float</ref>)</loc></decl>
266+
<decl:Constructor>convenience <loc>init!(<decl:Param>float f: <ref:Struct>Float</ref></decl>)</loc></decl>
267267
}</decl>
268268
<decl:Extension>extension <ref:Class><loc>FooRepeatedMembers</ref></loc> {
269269
<decl:Var>var <loc>repeatedPropertyInCategory</loc>: <ref:Struct>Int32</ref></decl>
@@ -274,7 +274,7 @@ func <loc>FooCFTypeRelease(_: <ref:Class>FooCFType</ref>!)</loc></decl>
274274
<decl:Func>func <loc>repeatedMethodFromCategory()</loc></decl>
275275
}</decl>
276276
<decl:Enum>enum <loc>SCNFilterMode</loc> : <ref:Struct>Int</ref> {
277-
<decl:Constructor><loc>init?(rawValue: <ref:Struct>Int</ref>)</loc></decl>
277+
<decl:Constructor><loc>init?(<decl:Param>rawValue: <ref:Struct>Int</ref></decl>)</loc></decl>
278278
<decl:Var>var <loc>rawValue</loc>: <ref:Struct>Int</ref> { get }</decl>
279279
<decl:EnumElement>case <loc>None</loc></decl>
280280
<decl:EnumElement>case <loc>Nearest</loc></decl>

test/IDE/print_synthesized_extensions.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ public struct S1<T> : P1, P2 {
5454

5555
// CHECK: <synthesized>/// Synthesized extension from P1
5656
// CHECK: extension S1 where T : P2 {
57-
// CHECK: <decl:Func>public func <loc>ef1(t: T)</loc></decl>
58-
// CHECK: <decl:Func>public func <loc>ef2(t: <ref:Struct>S2</ref>)</loc></decl>
57+
// CHECK: <decl:Func>public func <loc>ef1(<decl:Param>t: T</decl>)</loc></decl>
58+
// CHECK: <decl:Func>public func <loc>ef2(<decl:Param>t: <ref:Struct>S2</ref></decl>)</loc></decl>
5959
// CHECK: }</synthesized>
6060

6161
// CHECK: <synthesized>/// Synthesized extension from P1
6262
// CHECK: extension S1 where T == P2, S2 : P3 {
63-
// CHECK: <decl:Func>public func <loc>ef3(t: <ref:Protocol>P2</ref>)</loc></decl>
64-
// CHECK: <decl:Func>public func <loc>ef4(t: <ref:Protocol>P2</ref>)</loc></decl>
63+
// CHECK: <decl:Func>public func <loc>ef3(<decl:Param>t: <ref:Protocol>P2</ref></decl>)</loc></decl>
64+
// CHECK: <decl:Func>public func <loc>ef4(<decl:Param>t: <ref:Protocol>P2</ref></decl>)</loc></decl>
6565
// CHECK: }</synthesized>
6666

6767
// CHECK: <synthesized>/// Synthesized extension from P1
6868
// CHECK: extension S1 where S2 : P3 {
69-
// CHECK: <decl:Func>public func <loc>ef5(t: <ref:Struct>S2</ref>)</loc></decl>
69+
// CHECK: <decl:Func>public func <loc>ef5(<decl:Param>t: <ref:Struct>S2</ref></decl>)</loc></decl>
7070
// CHECK: }</synthesized>

0 commit comments

Comments
 (0)