Skip to content

Commit ece19b0

Browse files
grdsdevclaude
andcommitted
fix: resolve Swift 6.0 type inference issues in RealtimeTests
This commit fixes two Swift 6.0 compiler errors that were causing CI failures on Xcode 16.4: 1. In setUp(), explicitly unwrap the `client` implicitly unwrapped optional when captured in the wsTransport closure 2. In testBroadcastWithHTTP(), explicitly unwrap the `sut` implicitly unwrapped optional when captured in the mock response closure These changes are needed because Swift 6.0 is stricter about type inference with implicitly unwrapped optionals in closure capture lists. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent c8a3162 commit ece19b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/RealtimeTests/RealtimeTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ final class RealtimeTests: XCTestCase {
4949
"custom.access.token"
5050
}
5151
),
52-
wsTransport: { [client] _, _ in client },
52+
wsTransport: { [client] _, _ in client! },
5353
http: http
5454
)
5555
}
@@ -581,7 +581,7 @@ final class RealtimeTests: XCTestCase {
581581
HTTPResponse(
582582
data: "{}".data(using: .utf8)!,
583583
response: HTTPURLResponse(
584-
url: sut.broadcastURL,
584+
url: sut!.broadcastURL,
585585
statusCode: 200,
586586
httpVersion: nil,
587587
headerFields: nil

0 commit comments

Comments
 (0)