Skip to content

Commit f896c95

Browse files
committed
---
yaml --- r: 346873 b: refs/heads/master c: c266abc h: refs/heads/master i: 346871: d66efac
1 parent d21dc7e commit f896c95

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: dceb4041b18c47764c6dbdf00ce49090eb048608
2+
refs/heads/master: c266abc65673816e5936e979af7233f382e2defb
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/stdlib/public/core/Availability.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public func _stdlib_isOSVersionAtLeast(
2525
_ patch: Builtin.Word
2626
) -> Builtin.Int1 {
2727
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
28+
if Int(major) == 9999 {
29+
return true._value
30+
}
2831
// The call to _swift_stdlib_operatingSystemVersion is used as an indicator
2932
// that this function was called by a compiler optimization pass. If it is
3033
// replaced that pass needs to be updated.

trunk/test/stdlib/Runtime.swift.gyb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,9 @@ AvailabilityVersionsTestSuite.test("_stdlib_isOSVersionAtLeast") {
766766
expectFalse(isAtLeastOS(1066, 0, 0))
767767
expectTrue(isAtLeastOS(0, 1066, 0))
768768
expectTrue(isAtLeastOS(0, 0, 1066))
769+
770+
// 9999 is a special version that's always available
771+
expectTrue(isAtLeastOS(9999, 0, 0))
769772
#endif
770773
}
771774

0 commit comments

Comments
 (0)