We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
md5: 968191e4dedab2396616e09ddaceb135
Issue Description:
Right now, it is impossible to restrict a protocol to a subclass of a specific class.
class Superclass {} protocol Test { func f<Self: Superclass>(param: Self) }
Trying to do so will appear to work, but in reality is a redefinition of Self which the compiler doesn't warn about.
Self
Adding a warning would help developers determine what is actually happening in this case.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Additional Detail from JIRA
md5: 968191e4dedab2396616e09ddaceb135
Issue Description:
Right now, it is impossible to restrict a protocol to a subclass of a specific class.
Trying to do so will appear to work, but in reality is a redefinition of
Self
which the compiler doesn't warn about.Adding a warning would help developers determine what is actually happening in this case.
The text was updated successfully, but these errors were encountered: