Skip to content

Commit

Permalink
Fixed build error with Realm v10.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Mkrtchyan committed Jan 20, 2022
1 parent a1d3cfd commit a37f086
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Unrealm.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Pod::Spec.new do |s|
s.name = 'Unrealm'
s.swift_version = '5.5'
s.version = '1.9.3'
s.version = '1.9.4'
s.summary = 'Unrealm is an extension on RealmCocoa, which enables Swift native types to be saved in Realm.'
s.description = <<-DESC
Unrealm enables you to easily store Swift native Classes, Structs and Enums into Realm.
Expand Down
8 changes: 4 additions & 4 deletions Unrealm/Classes/Swift/Results.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ extension Results {

- parameter property: The name of a property whose minimum value is desired.
*/
public func min<T: MinMaxType>(ofProperty property: String) -> T? {
public func min<T: _HasPersistedType>(ofProperty property: String) -> T? where T.PersistedType: MinMaxType {
return rlmResult.min(ofProperty: property)
}

Expand All @@ -159,7 +159,7 @@ extension Results {

- parameter property: The name of a property whose minimum value is desired.
*/
public func max<T: MinMaxType>(ofProperty property: String) -> T? {
public func max<T: _HasPersistedType>(ofProperty property: String) -> T? where T.PersistedType: MinMaxType {
return rlmResult.max(ofProperty: property)
}

Expand All @@ -170,7 +170,7 @@ extension Results {

- parameter property: The name of a property whose values should be summed.
*/
public func sum<T: AddableType>(ofProperty property: String) -> T {
public func sum<T: _HasPersistedType>(ofProperty property: String) -> T where T.PersistedType: AddableType {
return rlmResult.sum(ofProperty: property)
}

Expand All @@ -181,7 +181,7 @@ extension Results {

- parameter property: The name of a property whose average value should be calculated.
*/
public func average<T: AddableType>(ofProperty property: String) -> T? {
public func average<T: _HasPersistedType>(ofProperty property: String) -> T? where T.PersistedType: AddableType {
return rlmResult.average(ofProperty: property)
}
}
Expand Down

0 comments on commit a37f086

Please sign in to comment.