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

Implement SIP 57 - add runtimeChecked method and annotation #20987

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bishabosha
Copy link
Member

@bishabosha bishabosha commented Jul 3, 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

@bishabosha
Copy link
Member Author

bishabosha commented Jul 3, 2024

For the future: once the definition is stabilised, we can deprecate @unchecked in this use case, switch over code generation, semantic checks, error messages to use .runtimeChecked instead of : @unchecked

And also later possibly a language mode could introduce that refutable pattern bindings become an error?

@bishabosha bishabosha marked this pull request as ready for review July 3, 2024 20:54
@bishabosha bishabosha marked this pull request as draft July 4, 2024 09:29
@bishabosha bishabosha marked this pull request as ready for review July 4, 2024 11:40
@bishabosha
Copy link
Member Author

@Gedochao how can I get this reviewed?

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.

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