Skip to content

Commit

Permalink
Fix builds for Swift 5.6 and below
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnEstropia committed Jul 8, 2022
1 parent 6264022 commit e921968
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Sources/Where.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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)

Expand Down

0 comments on commit e921968

Please sign in to comment.