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-9793] Inappropriate diagnostics for access level of protocol witness declared in extension #52218

Open
swift-ci opened this issue Jan 29, 2019 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself diagnostics QoI Bug: Diagnostics Quality of Implementation

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-9793
Radar None
Original Reporter dingobye (JIRA User)
Type Bug
Status In Progress
Resolution
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI
Assignee dingobye (JIRA)
Priority Medium

md5: ba9e8e59c03a898fcdd3ceb5bd065720

Issue Description:

If the access level of a protocol witness does not satisfies a requirement, the compiler suggests marking it as the required level. This is not suitable when the witness is in an extension that forbids the required level.

For example, in the following case, the note suggests marking foo() as 'internal'. However, it would conflict with 'private' extension.

internal protocol Proto {
  func foo()
}
public struct S : Proto {
}
private extension S {
  func foo() {} // note: mark the instance method as 'internal' to satisfy the requirement
}
@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. compiler The Swift compiler itself diagnostics QoI Bug: Diagnostics Quality of Implementation
Projects
None yet
Development

No branches or pull requests

1 participant