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-3882] @objc protocol conformance info isn't recorded when a type conforms to a Swift sub-protocol #46467

Closed
jckarter opened this issue Feb 6, 2017 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers IRGen LLVM IR generation

Comments

@jckarter
Copy link
Member

jckarter commented Feb 6, 2017

Previous ID SR-3882
Radar rdar://problem/24453316
Original Reporter @jckarter
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, IRGen, StarterBug
Assignee pszot (JIRA)
Priority Medium

md5: 81faa2c7bb51b407ffd231c12af1650f

Issue Description:

The following code should print true twice, but the is Base check erroneously fails:

import Foundation

@objc protocol Base {}

protocol Some : Base {}

class Nada : NSObject, Some {}

let x: NSObject = Nada()

print("Nada is Some? \(x is Some)")
print("Nada is Base? \(x is Base)")

I suspect that, when we emit the ObjC metadata for Nada, we fail to walk the super-protocols of the protocols that Nada conforms to in order to find ObjC protocol conformances that need to be recorded.

@swift-ci
Copy link
Collaborator

Comment by Pawel Szot (JIRA)

#7665

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 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 A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers IRGen LLVM IR generation
Projects
None yet
Development

No branches or pull requests

2 participants