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-11892] Suggest inheriting NSObject instead of providing stubs for NSObjectProtocol #54309

Closed
jckarter opened this issue Dec 4, 2019 · 3 comments
Labels
compiler The Swift compiler in itself good first issue Good for newcomers task

Comments

@jckarter
Copy link
Member

jckarter commented Dec 4, 2019

Previous ID SR-11892
Radar rdar://problem/57652270
Original Reporter @jckarter
Type Task
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Task, StarterBug
Assignee None
Priority Medium

md5: 645c7c0cbdfebd74c38dc291c668bb62

Issue Description:

https://twitter.com/peres/status/1201904431207456769

If you try to make a type conform to NSObjectProtocol, the compiler will helpfully offer to generate stubs for you…but there are a ton of requirements, and there's no practical way to implement many of them in Swift. It would be more helpful to suggest making the class inherit `NSObject` instead (if it doesn't already have a base class), since that's generally a practical requirement to get acceptable `NSObjectProtocol` implementations anyway.

@CodaFi
Copy link
Member

CodaFi commented Dec 5, 2019

@swift-ci create

Going to add this to the pile of witness matching diagnostics bugs.

@swift-ci
Copy link
Collaborator

Comment by Ivan Smetanin (JIRA)

I think it was resolved in #28591 and should be closed

@CodaFi @jckarter @DougGregor

@DougGregor
Copy link
Member

Yes, this is done.

@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
compiler The Swift compiler in itself good first issue Good for newcomers task
Projects
None yet
Development

No branches or pull requests

4 participants