Repository navigation
Commit 8087c1c
committed
fix(swift): read a constructor type through try and await
`let socket = try ServerSocket(...)` and `let reader = try await
Reader(...)` left the variable untyped, so every member call on it went
to a label-only guess or was dropped. The initializer is now unwrapped
from `try` / `await` before its constructor type is read. Only a bare
type name counts there: `try Foo.make()` returns what make returns,
which the registry still infers from the call.
With the type in place the existing base-class and extension walk
applies: on swift-nio socket.close(), socket.bind(to:) and
socket.getLocalVsockAddress() in VsockAddressTest.swift resolve to
ServerSocket, BaseSocket and the BaseSocket extension in VsockAddress.swift.
Signed-off-by: Martin Vogel <[email protected]>1 parent 8372793 commit 8087c1c
1 file changed
Lines changed: 31 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
| 223 | + | |
223 | 224 | | |
224 | 225 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | 226 | | |
229 | 227 | | |
230 | | - | |
| 228 | + | |
231 | 229 | | |
232 | 230 | | |
233 | 231 | | |
234 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
235 | 258 | | |
236 | 259 | | |
237 | 260 | | |
| |||
265 | 288 | | |
266 | 289 | | |
267 | 290 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
| 291 | + | |
| 292 | + | |
275 | 293 | | |
276 | 294 | | |
277 | 295 | | |
| |||
0 commit comments