Skip to content

[SR-12836] Extensions with access modifiers don't have such accesses indexed #55282

Open
@swift-ci

Description

@swift-ci
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions