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-1950] Read-only protocol property requirements not satisfied by subtypes, when they should be #44559

Closed
swift-ci opened this issue Jun 30, 2016 · 0 comments
Labels
compiler The Swift compiler in itself conformances Feature → protocol: protocol conformances duplicate Resolution: Duplicates another issue feature A feature request or implementation improvement protocol Feature → type declarations: Protocol declarations type checker Area → compiler: Semantic analysis

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Jun 30, 2016

Previous ID SR-1950
Radar None
Original Reporter jmeggesto (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

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

md5: eb8a5cbd4c2b9bb32829979d579cd44b

duplicates:

  • SR-522 Protocol funcs cannot have covariant returns

Issue Description:

Protocol property requirements are not satisfied by subtypes of the property type.

For example: a protocol that requires a property of UIResponder? will not be satisfied with an implementation of that property as UIViewController?, or UIView? and will instead require the base UIResponder? to fulfill the requirement.

See attached screenshot.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added duplicate Resolution: Duplicates another issue feature A feature request or implementation conformances Feature → protocol: protocol conformances protocol Feature → type declarations: Protocol declarations compiler The Swift compiler in itself type checker Area → compiler: Semantic analysis improvement and removed bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. labels Jan 27, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself conformances Feature → protocol: protocol conformances duplicate Resolution: Duplicates another issue feature A feature request or implementation improvement protocol Feature → type declarations: Protocol declarations type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

2 participants