-
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
Bad diagnostic when inheriting from class in extension #64903
Comments
Hey all, I'd like to give a try on solving this issue.😀 |
Hello, can I work on this issue if no progress has been made yet for this issue? |
@StevenWong12 Are you working on this? |
@Aringopalan Please feel free to take it😊 |
Thanks a lot @AnthonyLatsis sir |
im really sorry i did that by mistake could you pls assign it back to me 😅 |
Reviewing the code and after several tries i believe this to be one optimal rewording
|
If there is any further issue with the code ill work on it and reword it for better compilation |
I think the original vision of this issue is to rewrite the diagnostic message in the type check stage e.g. |
Ohhh 🫠, I did a total 360 here but I guess I can still work on it, rephrase all of them to be more readable. |
Hey @Aringopalan , Are you still working on the issue? |
@dk-talks feel free to take it , im not working it. |
Hey @AnthonyLatsis I have resolved this issues. Please have a look at my Pull Request. #65531 |
@AnthonyLatsis is this issue still open? |
@GunjanRawat26 Yep, errors are still the same. |
@xedin Hey, I’m planning to work on this issue, and I noticed that in a previously raised PR, you mentioned that only certain types are allowed in the inheritance clause here. However, it seems like that case was already handled here. Could you please brief me on any additional cases that still need to be addressed? |
@GunjanRawat26 I recommend focusing just on the cases shown in the original example.
This can be interpreted as "a class can inherit from protocol only in extension", which is wrong. I think we can do better. For example: |
The following errors are misleading and could use a rewording as clear language rules, depending on the kinds of extended and inherited types.
Environment
NB: How to improve on these is left as an exercise to whoever takes the issue.
The text was updated successfully, but these errors were encountered: