-
Notifications
You must be signed in to change notification settings - Fork 77
warning 204 only works on unused variables #479
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
Comments
Another special case:
Here |
This issue has been automatically marked as stale because it has not had recent activity. |
To the maintainers: please do not close this issue yet. |
This issue has been automatically marked as stale because it has not had recent activity. |
All of the remaining ideas were implemented in #533, closing. |
Issue description:
Warning 204 (
symbol is assigned a value that is never used
) only works in simple cases when the variable is unused.But if an unused value is assigned after the point where the variable is used, then the compiler won't warn about it:
Another problem is when the previously assigned value is unused, the compiler doesn't warn about this kind of errors at all:
Since the compiler already warns about unused assignments for unused variables, I think it would be beneficial to make it issue warnings in the aforementioned cases as well.
Minimal complete verifiable example (MCVE):
See above.
Workspace Information:
The text was updated successfully, but these errors were encountered: