Skip to content
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

Warn if a variable is never changed #7834

Closed
atomicbitty opened this issue Jan 19, 2021 · 3 comments
Closed

Warn if a variable is never changed #7834

atomicbitty opened this issue Jan 19, 2021 · 3 comments
Milestone

Comments

@atomicbitty
Copy link

It would be nice if the compiler warned us about vars that are never modified so that we can make them consts.

@tauoverpi
Copy link
Contributor

Already covered by #224 though it would be slightly annoying when playing around with code samples if #3320 isn't implemented.

@atomicbitty
Copy link
Author

In #224 the compiler would throw an error for that case, but I think an error is unnecessary and very annoying for this situation, that's why I think a warning would suffice.

@atomicbitty
Copy link
Author

Apparenty zig doesn't have warnings, even though I don't think this is something good...

@andrewrk andrewrk added this to the 0.8.0 milestone Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants