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)