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-11110] swift-format moves private extension when it's really fileprivate #367

Closed
keith opened this issue Jul 11, 2019 · 1 comment
Closed
Assignees
Labels
bug Something isn't working swift-format

Comments

@keith
Copy link
Member

keith commented Jul 11, 2019

Previous ID SR-11110
Radar None
Original Reporter @keith
Type Bug
Status Resolved
Resolution Done
Environment

#1

Additional Detail from JIRA
Votes 0
Component/s swift-format
Labels Bug
Assignee @allevato
Priority Medium

md5: 358f531ec146af7e4e65c47264980635

Issue Description:

With this code:

private extension String {
  func foo() {}
}

"".foo()

swift-format produces:

extension String {
  private func foo() {}
}

"".foo()

which fails to compile with:

/tmp/bar.swift:5:4: error: 'foo' is inaccessible due to 'private' protection level
"".foo()
   ^~~
/tmp/bar.swift:2:16: note: 'foo()' declared here
  private func foo() {}
               ^
@allevato
Copy link
Member

Fixed by #3.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from swiftlang/swift May 9, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working swift-format
Projects
None yet
Development

No branches or pull requests

2 participants