Skip to content

Commit c79d5cf

Browse files
committed
[Sema] Still use the current minimum deployment target as fallback
1 parent 39ee591 commit c79d5cf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Sema/TypeCheckAvailability.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,14 @@ TypeChecker::overApproximateAvailabilityAtLocation(SourceLoc loc,
720720
}
721721
}
722722

723+
// If we still don't have an introduction version, use the current deployment
724+
// target. This covers cases where an inlinable function and its parent
725+
// contexts don't have explicit availability attributes.
726+
if (!OverApproximateContext.getOSVersion().hasLowerEndpoint()) {
727+
auto currentOS = AvailabilityContext::forDeploymentTarget(Context);
728+
OverApproximateContext.constrainWith(currentOS);
729+
}
730+
723731
return OverApproximateContext;
724732
}
725733

0 commit comments

Comments
 (0)