@@ -1527,7 +1527,7 @@ extension Triple {
1527
1527
/// `darwin` OS version number is not adjusted to match the equivalent
1528
1528
/// `macosx` version number. It's usually better to use `version(for:)`
1529
1529
/// to get Darwin versions.
1530
- public var osVersion : Version {
1530
+ public var osVersion : Version ? {
1531
1531
var osName = self . osName [ ... ]
1532
1532
1533
1533
// Assume that the OS portion of the triple starts with the canonical name.
@@ -1626,7 +1626,7 @@ extension Triple {
1626
1626
///
1627
1627
/// This accessor is semi-private; it's typically better to use `version(for:)` or
1628
1628
/// `Triple.FeatureAvailability`.
1629
- public var _iOSVersion : Version {
1629
+ public var _iOSVersion : Version ? {
1630
1630
switch os {
1631
1631
case . darwin, . macosx:
1632
1632
// Ignore the version from the triple. This is only handled because the
@@ -1653,7 +1653,7 @@ extension Triple {
1653
1653
///
1654
1654
/// This accessor is semi-private; it's typically better to use `version(for:)` or
1655
1655
/// `Triple.FeatureAvailability`.
1656
- public var _watchOSVersion : Version {
1656
+ public var _watchOSVersion : Version ? {
1657
1657
switch os {
1658
1658
case . darwin, . macosx:
1659
1659
// Ignore the version from the triple. This is only handled because the
@@ -1662,7 +1662,7 @@ extension Triple {
1662
1662
// OS X.
1663
1663
return Version ( 2 , 0 , 0 )
1664
1664
case . watchos:
1665
- var version = self . osVersion
1665
+ guard var version = self . osVersion else { return nil }
1666
1666
if version. major == 0 {
1667
1667
version. major = 2
1668
1668
}
0 commit comments