@@ -69,9 +69,12 @@ typealias <loc>FooTypedef1</loc> = <ref:Struct>Int32</ref></decl>
69
69
var <loc>fooIntVar</loc>: <ref:Struct>Int32</ref></decl>
70
70
71
71
<decl:Func>/// Aaa. fooFunc1. Bbb.
72
+ @discardableResult
72
73
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>
74
+ <decl:Func>@discardableResult
75
+ func <loc>fooFunc1AnonymousParam(<decl:Param>_: <ref:Struct>Int32</ref></decl>)</loc> -> <ref:Struct>Int32</ref></decl>
76
+ <decl:Func>@discardableResult
77
+ 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
78
<decl:Func>func <loc>fooFuncWithBlock(<decl:Param>_ blk: ((<ref:Struct>Float</ref>) -> <ref:Struct>Int32</ref>)!</decl>)</loc></decl>
76
79
<decl:Func>func <loc>fooFuncWithFunctionPointer(<decl:Param>_ fptr: (@convention(c) (<ref:Struct>Float</ref>) -> <ref:Struct>Int32</ref>)!</decl>)</loc></decl>
77
80
<decl:Func>@noreturn func <loc>fooFuncNoreturn1()</loc></decl>
@@ -111,8 +114,10 @@ func <loc>fooFuncWithComment4()</loc></decl>
111
114
func <loc>fooFuncWithComment5()</loc></decl>
112
115
113
116
<decl:Func>/// Aaa. redeclaredInMultipleModulesFunc1. Bbb.
117
+ @discardableResult
114
118
func <loc>redeclaredInMultipleModulesFunc1(<decl:Param>_ a: <ref:Struct>Int32</ref></decl>)</loc> -> <ref:Struct>Int32</ref></decl>
115
119
<decl:Func>@available(*, unavailable, message: "Variadic function is unavailable")
120
+ @discardableResult
116
121
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>
117
122
118
123
<decl:Protocol>/// Aaa. FooProtocolBase. Bbb.
@@ -141,15 +146,18 @@ protocol <loc>FooProtocolBase</loc> {
141
146
<decl:Class>class <loc>FooClassBase</loc> {
142
147
<decl:Func>class func <loc>fooBaseInstanceFunc0()</loc></decl>
143
148
<decl:Func>func <loc>fooBaseInstanceFunc0()</loc></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>
149
+ <decl:Func>@discardableResult
150
+ class func <loc>fooBaseInstanceFunc1(<decl:Param>_ anObject: <ref:Protocol>AnyObject</ref>!</decl>)</loc> -> <ref:Class>FooClassBase</ref>!</decl>
151
+ <decl:Func>@discardableResult
152
+ func <loc>fooBaseInstanceFunc1(<decl:Param>_ anObject: <ref:Protocol>AnyObject</ref>!</decl>)</loc> -> <ref:Class>FooClassBase</ref>!</decl>
146
153
<decl:Constructor><loc>init!()</loc></decl>
147
154
<decl:Constructor>convenience <loc>init!(<decl:Param>float f: <ref:Struct>Float</ref></decl>)</loc></decl>
148
155
<decl:Func>class func <loc>fooBaseInstanceFuncOverridden()</loc></decl>
149
156
<decl:Func>func <loc>fooBaseInstanceFuncOverridden()</loc></decl>
150
157
<decl:Func>class func <loc>fooBaseClassFunc0()</loc></decl>
151
158
<decl:Constructor>/*not inherited*/ <loc>init!(<decl:Param>_ x: <ref:Struct>Int32</ref></decl>)</loc></decl>
152
159
<decl:Func>@available(*, unavailable, message: "use object construction 'FooClassBase(_:)'")
160
+ @discardableResult
153
161
class func <loc>fooClassBase(<decl:Param>_ x: <ref:Struct>Int32</ref></decl>)</loc> -> <ref:Class>FooClassBase</ref>!</decl>
154
162
}</decl>
155
163
@@ -196,18 +204,26 @@ class <loc>FooClassDerived</loc> : <ref:Class>FooClassBase</ref>, <ref:Protocol>
196
204
<decl:Constructor><loc>init(<decl:Param>x: <ref:Struct>Int32</ref></decl>)</loc></decl>
197
205
}</decl>
198
206
<decl:Extension>extension <loc><ref:Class>FooClassBase</ref></loc> {
199
- <decl:Func>class func <loc>_internalMeth1()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
200
- <decl:Func>func <loc>_internalMeth1()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
207
+ <decl:Func>@discardableResult
208
+ class func <loc>_internalMeth1()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
209
+ <decl:Func>@discardableResult
210
+ func <loc>_internalMeth1()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
201
211
}</decl>
202
212
<decl:Extension>extension <loc><ref:Class>FooClassBase</ref></loc> {
203
- <decl:Func>class func <loc>_internalMeth2()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
204
- <decl:Func>func <loc>_internalMeth2()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
205
- <decl:Func>class func <loc>nonInternalMeth()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
206
- <decl:Func>func <loc>nonInternalMeth()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
213
+ <decl:Func>@discardableResult
214
+ class func <loc>_internalMeth2()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
215
+ <decl:Func>@discardableResult
216
+ func <loc>_internalMeth2()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
217
+ <decl:Func>@discardableResult
218
+ class func <loc>nonInternalMeth()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
219
+ <decl:Func>@discardableResult
220
+ func <loc>nonInternalMeth()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
207
221
}</decl>
208
222
<decl:Extension>extension <loc><ref:Class>FooClassBase</ref></loc> {
209
- <decl:Func>class func <loc>_internalMeth3()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
210
- <decl:Func>func <loc>_internalMeth3()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
223
+ <decl:Func>@discardableResult
224
+ class func <loc>_internalMeth3()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
225
+ <decl:Func>@discardableResult
226
+ func <loc>_internalMeth3()</loc> -> <ref:Protocol>AnyObject</ref>!</decl>
211
227
}</decl>
212
228
<decl:Protocol>protocol <loc>_InternalProt</loc> {
213
229
}</decl>
@@ -238,6 +254,7 @@ class <loc>FooClassDerived</loc> : <ref:Class>FooClassBase</ref>, <ref:Protocol>
238
254
<decl:Class>class <loc>FooUnavailableMembers</loc> : <ref:Class>FooClassBase</ref> {
239
255
<decl:Constructor>convenience <loc>init!(<decl:Param>int i: <ref:Struct>Int32</ref></decl>)</loc></decl>
240
256
<decl:Func>@available(*, unavailable, message: "use object construction 'FooUnavailableMembers(int:)'")
257
+ @discardableResult
241
258
class func <loc>withInt(<decl:Param>_ i: <ref:Struct>Int32</ref></decl>)</loc> -> <ref:Class>Self</ref>!</decl>
242
259
<decl:Func>@available(*, unavailable, message: "x")
243
260
func <loc>unavailable()</loc></decl>
0 commit comments