Skip to content

Bring back pattern match exhaustivity checking for macros #22622

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

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

jchyb
Copy link
Contributor

@jchyb jchyb commented Feb 18, 2025

Also move the -Werror reporting until after the suspended warning reporting - this was needed for the added test to work (as previously the compilation would not error out even if -Werror was used).

Fixes #22212

Also move the -Werror reporting until after the suspended warning
reporting - this was needed for the added test to work (as previously
the compilation would not error out even if -Werror was used).
@jchyb
Copy link
Contributor Author

jchyb commented Feb 18, 2025

@dwijnand Is that something we can do? I saw that the changes in 4f22672 were intentional. Unlike reachability, it's easy enough to suppress exhaustivity checks on the user side in macros (and, if left disabled in the compiler, implementing those checks on the user side seems difficult). What do you think?

@jchyb
Copy link
Contributor Author

jchyb commented Mar 3, 2025

Thank you @dwijnand! I will admit I did not know it was possible to have tests with macro execution in nonBootstrapped test runs. I see there are more of these (like in tests/run), even though most macro tests are in bootstrapped-only versions (like tests/run-macros). I will have to check why that is. I will probably also have to file an issue for the -Werror not working here, but I can do that separately.

@jchyb jchyb merged commit 788016a into scala:main Mar 3, 2025
29 checks passed
@jchyb jchyb deleted the fix-i22212-exhaustivity-macro branch March 3, 2025 17:00
@WojciechMazur WojciechMazur added this to the 3.7.0 milestone Mar 11, 2025
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.

Changes from 3.4.0 breaks match exhaustive checking of a macros
3 participants