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-12836] Extensions with access modifiers don't have such accesses indexed #55282

Open
swift-ci opened this issue May 19, 2020 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-12836
Radar None
Original Reporter rockbruno (JIRA User)
Type Bug
Environment

Xcode 11.4.1

Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Bug
Assignee None
Priority Medium

md5: 26ee7c5b26ba72044d15e3771f8c476d

Issue Description:

Here, SourceKit will correctly mark `foo` with the `public` attribute when indexing:

extension Int {
    public func foo() {}
}

If you place the access modifier in the extension, however:

public extension Int {
    func foo() {}
}

...neither the extension or `foo` will have `public` as an access attribute in the result of a index.source SourceKit request.

@swift-ci
Copy link
Collaborator Author

Comment by Bruno Rocha (JIRA)

As explained by @xwu in #31942 SourceKit isn't wrong here. We could have an attribute that represents the `effective` access level instead if doing so is a good idea.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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.
Projects
None yet
Development

No branches or pull requests

1 participant