Skip to content

Commit cd84bc1

Browse files
authored
Merge pull request swiftlang#27044 from drodriguez/remove-warning-TestJSONEncoder
Remove warnings from TestJSONEncoder compilation.
2 parents d1f139c + 67711fe commit cd84bc1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/stdlib/TestJSONEncoder.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ class TestJSONEncoder : TestJSONEncoderSuper {
669669
encoder.keyEncodingStrategy = .convertToSnakeCase
670670
do {
671671
_ = try encoder.encode(toEncode)
672-
} catch EncodingError.invalidValue(let (_, context)) {
672+
} catch EncodingError.invalidValue(_, let context) {
673673
expectEqual(2, context.codingPath.count)
674674
expectEqual("key", context.codingPath[0].stringValue)
675675
expectEqual("someValue", context.codingPath[1].stringValue)
@@ -685,7 +685,7 @@ class TestJSONEncoder : TestJSONEncoderSuper {
685685
encoder.keyEncodingStrategy = .convertToSnakeCase
686686
do {
687687
_ = try encoder.encode(toEncode)
688-
} catch EncodingError.invalidValue(let (_, context)) {
688+
} catch EncodingError.invalidValue(_, let context) {
689689
expectEqual(4, context.codingPath.count)
690690
expectEqual("key", context.codingPath[0].stringValue)
691691
expectEqual("sub_key", context.codingPath[1].stringValue)
@@ -838,7 +838,7 @@ class TestJSONEncoder : TestJSONEncoderSuper {
838838
decoder.keyDecodingStrategy = .convertFromSnakeCase
839839
do {
840840
_ = try decoder.decode([String: Int].self, from: input)
841-
} catch DecodingError.typeMismatch(let (_, context)) {
841+
} catch DecodingError.typeMismatch(_, let context) {
842842
expectEqual(1, context.codingPath.count)
843843
expectEqual("leave_me_alone", context.codingPath[0].stringValue)
844844
} catch {
@@ -860,7 +860,7 @@ class TestJSONEncoder : TestJSONEncoderSuper {
860860
decoder.keyDecodingStrategy = .convertFromSnakeCase
861861
do {
862862
_ = try decoder.decode([String: [String : DecodeFailureNested]].self, from: input)
863-
} catch DecodingError.typeMismatch(let (_, context)) {
863+
} catch DecodingError.typeMismatch(_, let context) {
864864
expectEqual(4, context.codingPath.count)
865865
expectEqual("top_level", context.codingPath[0].stringValue)
866866
expectEqual("sub_level", context.codingPath[1].stringValue)

0 commit comments

Comments
 (0)