Skip to content

Switch override checking over to access scopes #4610

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

Conversation

jrose-apple
Copy link
Contributor

  • Explanation: Swift's access control restricts puts certain requirements on members that are overrides of members in the superclass. This logic hadn't been updated for SE-0025, resulting in incorrect and confusing diagnostics. (This is basically the override version of Check protocol witnesses using access scopes. #4176, which made a similar fix for protocol witnesses.)

    There's an extra commit in here from @rintaro; that's mostly to make sure my change applies cleanly (their logic is all replaced), but also includes extra tests.

  • Scope: Affects all access checking for overrides.

  • Issue: rdar://problem/27820665

  • Reviewed by: @rjmccall

  • Risk: Medium. As has been pointed out this may break existing Swift 3 code that's doing something a little bit invalid that the old logic wasn't checking; I haven't tried to come up with such a case.

  • Testing: Added compiler regression tests, checked existing tests in this area.

rintaro and others added 2 commits September 2, 2016 18:08
The class version of f65ad81. Fixes some incorrect diagnostics.

We really do need https://bugs.swift.org/browse/SR-2209 to make
this all cleaner.

rdar://problem/27820665
(cherry picked from commit 8b1ce7d)
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple jrose-apple merged commit da4d996 into swiftlang:swift-3.0-branch Sep 6, 2016
@jrose-apple jrose-apple deleted the swift-3-override-access-scopes branch September 6, 2016 18:07
kateinoigakukun added a commit that referenced this pull request Aug 31, 2022
[pull] swiftwasm from main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants