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

[SIP 57] Add runtimeChecked method to replace @unchecked in the context that means "check at runtime" #21012

Closed
bishabosha opened this issue Jul 4, 2024 · 0 comments · Fixed by #20987

Comments

@bishabosha
Copy link
Member

bishabosha commented Jul 4, 2024

SIP 57 is accepted for implementation: https://docs.scala-lang.org/sips/replace-nonsensical-unchecked-annotation.html

Add a new method scala.Predef.runtimeChecked that when applied to a value in match scrutinee position, turns off pattern match exhaustivity warnings, and refutable pattern binding warnings

@bishabosha bishabosha added the stat:needs triage Every issue needs to have an "area" and "itype" label label Jul 4, 2024
@bishabosha bishabosha added itype:language enhancement and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jul 4, 2024
@bishabosha bishabosha self-assigned this Jul 4, 2024
@bishabosha bishabosha changed the title [SIP 57] Add language mode for replacing @unchecked in the context that means "check at runtime" [SIP 57] Add runtimeChecked method to replace @unchecked in the context that means "check at runtime" Jul 4, 2024
bishabosha added a commit that referenced this issue Jul 24, 2024
ref:
https://docs.scala-lang.org/sips/replace-nonsensical-unchecked-annotation.html

Also this doesn't change synthetic code that is generated to use
`@unchecked`, or make `@unchecked` meaningless for this use case - this
should probably come at a later stage after the definition is no longer
experimental

fixes #21012
@WojciechMazur WojciechMazur added this to the 3.6.0 milestone Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants