Fix builds for Swift 5.6 and below

This commit is contained in:
John Estropia
2022-07-08 16:49:43 +09:00
parent 6264022ccf
commit e9219682b5

View File

@@ -197,7 +197,8 @@ public struct Where<O: DynamicObject>: 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<O: DynamicObject>: WhereClauseType, FetchClause, QueryClause
self.init(valuePredicate)
}
#else
case nil:
self.init(nilPredicate)
#endif
case is NSNull:
self.init(nilPredicate)