File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1539,19 +1539,20 @@ static bool fixAvailabilityByNarrowingNearbyVersionCheck(
1539
1539
TRC && TRC->getReason () != TypeRefinementContext::Reason::Root) {
1540
1540
1541
1541
// Only fix situations that are "nearby" versions, meaning
1542
- // disagreement on a minor -or-less version for non- macOS,
1543
- // or disagreement on a subminor -or-less version for macOS .
1542
+ // disagreement on a subminor -or-less version for macOS 10 ,
1543
+ // or disagreement on a minor -or-less version otherwise .
1544
1544
auto RunningVers = RunningRange.getLowerEndpoint ();
1545
1545
auto RequiredVers = RequiredRange.getLowerEndpoint ();
1546
1546
auto Platform = targetPlatform (Context.LangOpts );
1547
1547
if (RunningVers.getMajor () != RequiredVers.getMajor ())
1548
1548
return false ;
1549
1549
if ((Platform == PlatformKind::macOS ||
1550
1550
Platform == PlatformKind::macOSApplicationExtension) &&
1551
+ RunningVers.getMajor () == 10 &&
1551
1552
!(RunningVers.getMinor ().hasValue () &&
1552
1553
RequiredVers.getMinor ().hasValue () &&
1553
1554
RunningVers.getMinor ().getValue () ==
1554
- RequiredVers.getMinor ().getValue ()))
1555
+ RequiredVers.getMinor ().getValue ()))
1555
1556
return false ;
1556
1557
1557
1558
auto FixRange = TRC->getAvailabilityConditionVersionSourceRange (
You can’t perform that action at this time.
0 commit comments