Skip to content

Commit

Permalink
Use compiler version to be extra-careful
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Feb 24, 2022
1 parent da854da commit 9faf1d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Rearrange/NSTextRange+NSRange.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import AppKit
import UIKit
#endif

// Swift 5.5 is a proxy for iOS 15/macOS 12.0 SDK availability
#if (os(macOS) || os(iOS) || os(tvOS)) && swift(>=5.5)
#if (os(macOS) || os(iOS) || os(tvOS)) && compiler(>=5.5)

@available(iOS 15.0, macOS 12.0, tvOS 15.0, *)
public extension NSTextLocation {
Expand Down Expand Up @@ -38,6 +37,7 @@ public extension NSRange {
}

@available(iOS 15.0, macOS 12.0, tvOS 15.0, *)
@available(watchOS, unavailable)
public extension NSTextRange {
convenience init?(_ range: NSRange, provider: NSTextElementProvider) {
let docLocation = provider.documentRange.location
Expand Down

0 comments on commit 9faf1d7

Please # to comment.