-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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-7629] Wrong fixit when the type doesn't conform to a public protocol #50171
Comments
Good catch! Tagging as a Starter Bug, because I think this can be fixed by teaching |
Comment by Naruki Chigira (JIRA) I created PR. |
Comment by Naruki Chigira (JIRA) @belkadan I'm glad you to check my PR when you have a time. Thanks! |
Ah, I saw that Brent already started reviewing and was going to let him finish. I'll let him know! |
Comment by Naruki Chigira (JIRA) I understood! Thank you for your response 🙂 |
Comment by Daniel Jalkut (JIRA) I ran into this today and was also confused by it. I ended up finding https://bugs.swift.org/browse/SR-3003 where it seemed to be closed as fixed some time ago, but maybe the gist of that bug was actually slightly different. |
Ah, hm. We ended up taking the PR listed above; do you think there's still more work to be done? (You can try with a master or 5.0 snapshot at https://swift.org/download/.) |
Comment by Daniel Jalkut (JIRA) I confirmed the 1/5 snapshot doesn't offer the problematic fix-it. Ideally I think there should be a fix-it offered to add the public initializer. The error is confusing because it complains about the publicity of an initialzer that is not present in the developer's code. |
Comment by Steffan Andrews (JIRA) Issue persists in Swift 5.5.2 |
Environment
Xcode 9.3, Swift 4.1
Additional Detail from JIRA
md5: 54986872b23e84cdf4f86614e935c40e
Issue Description:
This is my code without the protocol conformance
The error message - " Initializer 'init(rawValue🙂' must be declared public because it matches a requirement in public protocol 'OptionSet' " is correct, but the fixit inserts 'public' after 'struct' like this -
The text was updated successfully, but these errors were encountered: