We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 884af3f commit 760cae3Copy full SHA for 760cae3
1 file changed
Sources/ReerJSON/JSONDecoderImpl.swift
@@ -477,10 +477,10 @@ extension JSONDecoderImpl: SingleValueDecodingContainer {
477
478
@inline(__always)
479
private func decodeInteger<T: FixedWidthInteger>() throws -> T {
480
- guard topValue.isNumber else {
481
- throw createTypeMismatchError(type: T.self, for: codingPath, value: topValue)
482
- }
483
guard let int: T = topValue.integer() else {
+ guard topValue.isNumber else {
+ throw createTypeMismatchError(type: T.self, for: codingPath, value: topValue)
+ }
484
throw DecodingError.dataCorrupted(.init(
485
codingPath: codingPath,
486
debugDescription: "Number \(topValue.numberValue) is not representable in Swift."
0 commit comments