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

experiment: only warn on unused identifiers if type-checking is (proper) error-free #4561

Merged
merged 4 commits into from
Jun 7, 2024

Conversation

crusso
Copy link
Contributor

@crusso crusso commented Jun 6, 2024

Builds on #4560

This should avoid false positives due to error recovery. Does however, remove many unused warnings from tests that contain real errors, preventing unused warnings from being reported.

Copy link

github-actions bot commented Jun 6, 2024

Comparing from c899462 to 49f5ef3:
The produced WebAssembly code seems to be completely unchanged.

@crusso crusso changed the base branch from master to luc/unused-detection-fix June 6, 2024 15:11
@crusso crusso requested a review from luc-blaeser June 6, 2024 15:12
@crusso crusso marked this pull request as ready for review June 6, 2024 15:12
Copy link
Contributor

@luc-blaeser luc-blaeser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you very much. No longer these spurious warnings when there is a type checking error.

@luc-blaeser luc-blaeser merged commit 49f5ef3 into luc/unused-detection-fix Jun 7, 2024
8 checks passed
mergify bot pushed a commit that referenced this pull request 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
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

Successfully merging this pull request may close these issues.

2 participants