Skip to content

Commit a918a1c

Browse files
committed
fix errors on Swift 6.2
1 parent 7138f1b commit a918a1c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Tests/AWSLambdaEventsTests/Utils/DateWrapperTests.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,13 @@ struct DateWrapperTests {
6464

6565
let date = "2020-03-26T16:53:05Z" // missing fractional seconds
6666
let json = #"{"date":"\#(date)"}"#
67-
#expect(throws: (any Error).self) {
68-
try JSONDecoder().decode(TestEvent.self, from: json.data(using: .utf8)!)
67+
#if swift(<6.2)
68+
let error = (any Error).self
69+
#else
70+
let error = Never.self
71+
#endif
72+
#expect(throws: error) {
73+
try JSONDecoder().decode(TestEvent.self, from: json.data(using: .utf8)!)
6974
}
7075
}
7176

0 commit comments

Comments
 (0)