File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ public func _stdlib_isOSVersionAtLeast(
25
25
_ patch: Builtin . Word
26
26
) -> Builtin . Int1 {
27
27
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
28
+ if Int ( major) == 9999 {
29
+ return true . _value
30
+ }
28
31
// The call to _swift_stdlib_operatingSystemVersion is used as an indicator
29
32
// that this function was called by a compiler optimization pass. If it is
30
33
// replaced that pass needs to be updated.
Original file line number Diff line number Diff line change @@ -766,6 +766,9 @@ AvailabilityVersionsTestSuite.test("_stdlib_isOSVersionAtLeast") {
766
766
expectFalse(isAtLeastOS(1066, 0, 0))
767
767
expectTrue(isAtLeastOS(0, 1066, 0))
768
768
expectTrue(isAtLeastOS(0, 0, 1066))
769
+
770
+ // 9999 is a special version that's always available
771
+ expectTrue(isAtLeastOS(9999, 0, 0))
769
772
#endif
770
773
}
771
774
You can’t perform that action at this time.
0 commit comments