From e9219682b52d73dba4d8d561241149c5c5ae2f30 Mon Sep 17 00:00:00 2001 From: John Estropia Date: Fri, 8 Jul 2022 16:49:43 +0900 Subject: [PATCH] Fix builds for Swift 5.6 and below --- Sources/Where.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Sources/Where.swift b/Sources/Where.swift index 0267914..c8a9e75 100644 --- a/Sources/Where.swift +++ b/Sources/Where.swift @@ -197,7 +197,8 @@ public struct Where: WhereClauseType, FetchClause, QueryClause ) } switch value { - + +#if swift(>=5.7) case let optionalValue as any FieldOptionalType: switch optionalValue.cs_wrappedValue { @@ -209,6 +210,12 @@ public struct Where: WhereClauseType, FetchClause, QueryClause self.init(valuePredicate) } +#else + case nil: + self.init(nilPredicate) + +#endif + case is NSNull: self.init(nilPredicate)