-
Notifications
You must be signed in to change notification settings - Fork 107
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
bug: incorrect unused identifier warning #4508
Comments
This was referenced Jun 5, 2024
Merged
Thank you for reporting. The PR #4560 should fix this issue. |
mergify bot
pushed a commit
that referenced
this issue
Jun 7, 2024
…gs on Type Check Errors) (#4560) Fix for issue: #4508 * Correctly detect used and unused declaration in switch and try-catch clauses. Only warn on unused identifiers if type-checking is error-free (#4561) * Avoid potential spurious cascading warnings in the presence of type checker errors. Updated: * Expected warnings in Motoko test cases. * Refactoring of the Motoko base library to comply with the improved detection: dfinity/motoko-base#636
luc-blaeser
added a commit
to dfinity/motoko-base
that referenced
this issue
Jun 7, 2024
Refactor base library to avoid warnings of the improved unused declaration detection, see bug fix dfinity/motoko#4560 for dfinity/motoko#4508.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code says that e is unused even though it is used.
This example seems somewhat minimal. For example without the var x = the error does not occur. With let instead of var it also does not occur.
Also, and perhaps related:
does not report that e is unused.
https://dfinity.slack.com/archives/CPL67E7MX/p1713629264089809
The text was updated successfully, but these errors were encountered: