Conversation
vinistock
force-pushed
the
vs_fix_anonymous_block_and_keyword_rest
branch
from
September 10, 2026 18:15
71542cd to
55ba472
Compare
KaanOzkan
approved these changes
Sep 10, 2026
Member
Author
|
Actually, we should push #2687 forward instead. |
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.
Motivation
I was testing out the latest Tapioca main and noticed that we are producing invalid syntax in RBIs for anonymous keyword rest or block parameters (see tests).
We are currently outputting this:
Implementation
The essence of the issue is that we create a hash of parameter types, which we lookup based on names. This only works if the parameter actually has a name.
The idea of the implementation is to rely on the fact that Sorbet errors if parameters are out of order and process them based on their position instead. This allows us to at least produce syntactically valid RBIs under the scenarios.
Tests
Added tests.