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-7751] No redeclaration errors in inheriting protocols #50291

Open
AnthonyLatsis opened this issue May 23, 2018 · 3 comments
Open

[SR-7751] No redeclaration errors in inheriting protocols #50291

AnthonyLatsis opened this issue May 23, 2018 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself type checker Area → compiler: Semantic analysis

Comments

@AnthonyLatsis
Copy link
Collaborator

Previous ID SR-7751
Radar None
Original Reporter @AnthonyLatsis
Type Bug
Environment

Xcode 9.3 (9E145)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, TypeChecker
Assignee None
Priority Medium

md5: 0aff653cab75cebf070259d286a28bba

Issue Description:

Here, `foo()` is statically known to be a redeclaration. We have to account for this, I suppose in checkRedeclaration.

protocol P {
  var foo: Int {get}
}
protocol PP: P {
  func foo()
}
@belkadan
Copy link
Contributor

It's true that this is inconsistent with what we do within a type.

@belkadan
Copy link
Contributor

…on the other hand, it might be source-breaking to start checking it, so we'd probably have to just make it a warning if we did.

@AnthonyLatsis
Copy link
Collaborator Author

Wouldn't it be strange to be source-breaking, considering implementations are knowingly erroneous?

@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 in itself type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

2 participants