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-14135] Improve diagnostic "delegating initializers in structs are not marked with 'convenience'" #56515

Closed
typesanitizer opened this issue Jan 31, 2021 · 3 comments

Comments

@typesanitizer
Copy link

@typesanitizer typesanitizer commented Jan 31, 2021

Previous ID SR-14135
Radar rdar://problem/73801694
Original Reporter @typesanitizer
Type Improvement
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, DiagnosticsQoI, StarterBug, TypeChecker
Assignee kaar3k (JIRA)
Priority Medium

md5: ba5134bb6bbac761973e61ff90803626

Issue Description:

This question on StackOverflow has 15 votes and the answer has 22 votes: https://stackoverflow.com/questions/44183770/delegating-initializers-in-structs-are-not-marked-with-convenience

I keep getting this error and I don't understand why.

error: delegating initializers in structs are not marked with 'convenience'

We should consider simplifying the diagnostic, say (strawman suggestion) "initializers in structs are not marked with 'convenience'".

We should also consider adding a fix-it which deletes the word 'convenience', so that even if the user doesn't understand the diagnostic, trying the fix-it does fix their issue.

@typesanitizer
Copy link
Author

@typesanitizer typesanitizer commented Jan 31, 2021

@swift-ci create

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented May 5, 2021

Comment by Karthik (JIRA)

theindigamer (JIRA User) created a PR for this #37267

I see that this is already assigned to someone else, please close if there is an existing PR for this.

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented May 6, 2021

Comment by Karthik (JIRA)

PR Merged
#37267

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

No branches or pull requests

2 participants