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-5856] Error claims a protocol is a generic type, but no generics are used #48426
Comments
Oops, good catch. Tagging this as a starter bug: there should be a special message for extensions of protocols. This means: 1. Finding out where this message is defined (look in include/swift/AST/DiagnosticsXXXX.def) |
Ah, I tried to mention that above. You'd get "static stored properties not supported in generic types" in the normal case and "static stored properties not supported in protocol extensions" otherwise. |
Comment by Oscar Swanros (JIRA) Yeah, figured it out once I saw the code lol. I think I'll have a PR soon. |
Comment by Oscar Swanros (JIRA) Do you have any idea where the test could be? Been greppin' around but can't find anything. |
Comment by Oscar Swanros (JIRA) Found it in |
Comment by Matthew Baranowski (JIRA) swanros (JIRA User) apologies, I assumed the ticket was available and grabbed it after talking to Robin Kunde who also assigned himself within minutes of me. Here is my PR: #11930 This is my first attempt to contribute to swift so my solution may be lacking. I'd appreciate any feedback of course, or to compare notes with your effort. |
Comment by Oscar Swanros (JIRA) Uh, bummer. I just submitted mine... #11934 — we actually did the same thing. /shrug |
Matthew's PR got merged a few weeks ago; marking as Resolved. |
Additional Detail from JIRA
md5: 1eea87b8a1fe05b63eade321219bac87
Issue Description:
I am wishing to implement a pattern similar to
Notification.Name
where anyone can add one later via anextension
, like this:This seems fine to me, but I get a confusing error when compiling:
The text was updated successfully, but these errors were encountered: