From 0ae3f32f7fd877f105cbe3b2f3d90cd7b13653ae Mon Sep 17 00:00:00 2001 From: Steven Roebert Date: Sat, 13 Jul 2024 12:53:00 +0200 Subject: [PATCH] Added compiler checks for Swift 6 specific code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Gwendal Roué --- GRDB/Record/FetchableRecord+Decodable.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GRDB/Record/FetchableRecord+Decodable.swift b/GRDB/Record/FetchableRecord+Decodable.swift index 16b4e57892..f89a12a5c2 100644 --- a/GRDB/Record/FetchableRecord+Decodable.swift +++ b/GRDB/Record/FetchableRecord+Decodable.swift @@ -506,15 +506,19 @@ private struct SingleValueRowDecoder: SingleValueDecodingCon func decode(_ type: Int16.Type) throws -> Int16 { try columnDecoder.decode(type) } func decode(_ type: Int32.Type) throws -> Int32 { try columnDecoder.decode(type) } func decode(_ type: Int64.Type) throws -> Int64 { try columnDecoder.decode(type) } +#if compiler(>=6) @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) func decode(_ type: Int128.Type) throws -> Int128 { try columnDecoder.decode(type) } +#endif func decode(_ type: UInt.Type) throws -> UInt { try columnDecoder.decode(type) } func decode(_ type: UInt8.Type) throws -> UInt8 { try columnDecoder.decode(type) } func decode(_ type: UInt16.Type) throws -> UInt16 { try columnDecoder.decode(type) } func decode(_ type: UInt32.Type) throws -> UInt32 { try columnDecoder.decode(type) } func decode(_ type: UInt64.Type) throws -> UInt64 { try columnDecoder.decode(type) } +#if compiler(>=6) @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) func decode(_ type: UInt128.Type) throws -> UInt128 { try columnDecoder.decode(type) } +#endif func decode(_ type: T.Type) throws -> T where T: Decodable { if let type = T.self as? any FetchableRecord.Type {