Skip to content

Commit

Permalink
Fix compilation with Xcode 15 beta 7
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoyne committed Aug 27, 2023
1 parent 9064acd commit 1ee9d5a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Realm/ObjectServerTests/SwiftObjectServerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2398,7 +2398,7 @@ class AnyRealmValueSyncTests: SwiftSyncTestCase {
// results in a warning about it being redundant due to the enclosing check, so
// it needs to be out of line.
func hasCombine() -> Bool {
if #available(OSX 10.15, watchOS 6.0, iOS 13.0, iOSApplicationExtension 13.0, OSXApplicationExtension 10.15, tvOS 13.0, *) {
if #available(macOS 10.15, watchOS 6.0, iOS 13.0, tvOS 13.0, *) {
return true
}
return false
Expand Down
2 changes: 1 addition & 1 deletion Realm/ObjectServerTests/SwiftSyncTestCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ extension SwiftSyncTestCase {
}
}

@available(OSX 10.15, watchOS 6.0, iOS 13.0, iOSApplicationExtension 13.0, OSXApplicationExtension 10.15, tvOS 13.0, *)
@available(macOS 10.15, watchOS 6.0, iOS 13.0, tvOS 13.0, *)
public extension Publisher {
func expectValue(_ testCase: XCTestCase, _ expectation: XCTestExpectation,
receiveValue: (@Sendable (Self.Output) -> Void)? = nil) -> AnyCancellable {
Expand Down
4 changes: 2 additions & 2 deletions RealmSwift/Projection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ private struct ProjectionProperty: @unchecked Sendable {
}

// An adaptor for os_unfair_lock to make it implement NSLocking
@available(OSX 10.12, watchOS 3.0, iOS 10.0, iOSApplicationExtension 10.0, OSXApplicationExtension 10.12, tvOS 10.0, *)
@available(OSX 10.12, watchOS 3.0, iOS 10.0, tvOS 10.0, *)
private final class UnfairLock: NSLocking, Sendable {
func lock() {
os_unfair_lock_lock(impl)
Expand All @@ -806,7 +806,7 @@ private final class UnfairLock: NSLocking, Sendable {

// We want to use os_unfair_lock when it's available, but fall back to NSLock otherwise
private func createLock() -> NSLocking {
if #available(OSX 10.12, watchOS 3.0, iOS 10.0, iOSApplicationExtension 10.0, OSXApplicationExtension 10.12, tvOS 10.0, *) {
if #available(macOS 10.12, watchOS 3.0, iOS 10.0, tvOS 10.0, *) {
return UnfairLock()
}
return NSLock()
Expand Down
2 changes: 1 addition & 1 deletion RealmSwift/Realm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@ internal extension Actor {
}

// A helper to invoke a regular isolated sendable function with this actor
func invoke<T>(_ fn: @Sendable (isolated Self) async throws -> T) async rethrows -> T {
func invoke<T: Sendable>(_ fn: @Sendable (isolated Self) async throws -> T) async rethrows -> T {
try await fn(self)
}
}
Expand Down
2 changes: 1 addition & 1 deletion RealmSwift/Tests/CombineTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extension Publisher {
// results in a warning about it being redundant due to the enclosing check, so
// it needs to be out of line.
func hasCombine() -> Bool {
if #available(OSX 10.15, watchOS 6.0, iOS 13.0, iOSApplicationExtension 13.0, OSXApplicationExtension 10.15, tvOS 13.0, *) {
if #available(macOS 10.15, watchOS 6.0, iOS 13.0, tvOS 13.0, *) {
return true
}
return false
Expand Down

0 comments on commit 1ee9d5a

Please sign in to comment.