Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15093] Update availability diagnostic for macOS major version number changes #57419

Open
beccadax opened this issue Aug 20, 2021 · 0 comments · May be fixed by #40307
Open

[SR-15093] Update availability diagnostic for macOS major version number changes #57419

beccadax opened this issue Aug 20, 2021 · 0 comments · May be fixed by #40307
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation good first issue Good for newcomers

Comments

@beccadax
Copy link
Contributor

Previous ID SR-15093
Radar None
Original Reporter @beccadax
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI, StarterBug
Assignee isaac.s (JIRA)
Priority Medium

md5: a76a5da1fc1aa7b153f4fc3280eab31e

Issue Description:

In TypeCheckAvailability.cpp, the function fixAvailabilityByNarrowingNearbyVersionCheck() checks if an availability specifier near the site of an error has a version that's very close to the one needed for that API, and if so, offers a fix-it for it.

"Very close" is defined as having the same major version number on most OSes, but for macOS, the minor version also has to match. This made sense a few years ago when macOS releases all had 10.x versions, but now that Apple is incrementing the major macOS version number regularly, it probably doesn't make sense anymore. So this condition should be tweaked to only apply if the major version number is 10.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
cbjeukendrup added a commit to cbjeukendrup/swift that referenced this issue Apr 13, 2023
cbjeukendrup added a commit to cbjeukendrup/swift that referenced this issue May 18, 2023
tonyarnold added a commit to tonyarnold/swift that referenced this issue Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant