Enhance safe mode - #25638
Merged
Merged
Conversation
Member
|
Im a bit surprised that some pattern matches work and others not e.g. #25389 |
Member
Author
|
Technically, the last case of an exhaustive match can be marked as assumed safe. We cannot just mark |
odersky
requested changes
Mar 28, 2026
odersky
left a comment
Contributor
There was a problem hiding this comment.
I suggest removing the exhaustivity part and leave it to be discussed further.
* fix sym exists check * add some Java classes * enforce pattern match exhaustivity
noti0na1
force-pushed
the
enhance-safe-mode
branch
from
March 30, 2026 01:22
5c041ed to
04881b7
Compare
Member
Author
|
If we think runtime exceptions are fine, then there is not need to forbid |
Contributor
Indeed. |
Member
Author
|
OK, I will add |
odersky
approved these changes
Mar 31, 2026
This was referenced Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enhance safe mode and fix a bug:
symexists check: the test in Fixes to Safe Mode Checking #25603 forgets the safe mode importenforce pattern match exhaustivity: The reason to enforce pattern match exhaustivity is one can intentionally create runtime exceptions by not matching a case.Close #25389
How much have you relied on LLM-based tools in this contribution?
Ask for suggestions on which classes to add