Skip to content

Commit 0ae3f32

Browse files
sroebertgroue
andauthored
Added compiler checks for Swift 6 specific code
Co-authored-by: Gwendal Roué <gr@pierlis.com>
1 parent c977cb8 commit 0ae3f32

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

GRDB/Record/FetchableRecord+Decodable.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,15 +506,19 @@ private struct SingleValueRowDecoder<R: FetchableRecord>: SingleValueDecodingCon
506506
func decode(_ type: Int16.Type) throws -> Int16 { try columnDecoder.decode(type) }
507507
func decode(_ type: Int32.Type) throws -> Int32 { try columnDecoder.decode(type) }
508508
func decode(_ type: Int64.Type) throws -> Int64 { try columnDecoder.decode(type) }
509+
#if compiler(>=6)
509510
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
510511
func decode(_ type: Int128.Type) throws -> Int128 { try columnDecoder.decode(type) }
512+
#endif
511513
func decode(_ type: UInt.Type) throws -> UInt { try columnDecoder.decode(type) }
512514
func decode(_ type: UInt8.Type) throws -> UInt8 { try columnDecoder.decode(type) }
513515
func decode(_ type: UInt16.Type) throws -> UInt16 { try columnDecoder.decode(type) }
514516
func decode(_ type: UInt32.Type) throws -> UInt32 { try columnDecoder.decode(type) }
515517
func decode(_ type: UInt64.Type) throws -> UInt64 { try columnDecoder.decode(type) }
518+
#if compiler(>=6)
516519
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
517520
func decode(_ type: UInt128.Type) throws -> UInt128 { try columnDecoder.decode(type) }
521+
#endif
518522

519523
func decode<T>(_ type: T.Type) throws -> T where T: Decodable {
520524
if let type = T.self as? any FetchableRecord.Type {

0 commit comments

Comments
 (0)