Skip to content

Add raising not_nil! to Sorbet void values#23

Draft
amomchilov wants to merge 4 commits intomainfrom
Alex/void-not_nil
Draft

Add raising not_nil! to Sorbet void values#23
amomchilov wants to merge 4 commits intomainfrom
Alex/void-not_nil

Conversation

@amomchilov
Copy link
Contributor

@amomchilov amomchilov commented Mar 18, 2026

No description provided.

@amomchilov
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@amomchilov amomchilov changed the title Move error message to raise line Add raising not_nil! to Sorbet void values Mar 18, 2026
Comment on lines +28 to +30
# FIXME: this is load-order dependent, and will break if it's loaded after the real
# `T::Private::Types::Void::VOID` module, which is frozen:
# https://github.com/sorbet/sorbet/blob/f0cb505/gems/sorbet-runtime/lib/types/private/types/void.rb#L17-L19
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is super janky. Is there any way to patch this in, without modifying sorbet-runtime to not freeze this value?

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.

1 participant