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-11420] Protocol Stubs Should Suggest Requirement Stubs for Renames As Well #53821

Open
CodaFi opened this issue Sep 4, 2019 · 2 comments
Open

Comments

@CodaFi
Copy link
Member

@CodaFi CodaFi commented Sep 4, 2019

Previous ID SR-11420
Radar rdar://problem/55041530
Original Reporter @CodaFi
Type Bug

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI, StarterBug
Assignee RoyCao (JIRA)
Priority Medium

md5: b5341cef12a65640a517d36946649164

Issue Description:

For some odd reason, we don't print requirements that we diagnose as "close enough" to another witness that we can offer a rename fixit. For requirements that nearly-match something in another module (especially one you don't control like Foundation), this means the stub we print is missing requirements and doesn't compile.

Look into the callers (or lack thereof) of swift::printRequirementStub to see why this is happening.

I've attached a small SwiftUI Mac app that tries to define a coordinator with a conformance to an Objective-C protocol that defines two requirements. If you open it up and try to build it, only one of the two requirement stubs is printed. The other notes that something in NSObject should be renamed. That remaining stub should be suggested and printed along with the other requirement.

@CodaFi
Copy link
Member Author

@CodaFi CodaFi commented Sep 4, 2019

@swift-ci create

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented Sep 26, 2020

Comment by CaoMing (JIRA)

I am interested in it and would like to fix🙂

@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
Projects
None yet
Development

No branches or pull requests

2 participants