Skip to content

Use static names for anonymous parameters#811

Draft
thomasmarshall wants to merge 1 commit intoko/rbs-over-prismfrom
anonymous-parameter-names
Draft

Use static names for anonymous parameters#811
thomasmarshall wants to merge 1 commit intoko/rbs-over-prismfrom
anonymous-parameter-names

Conversation

@thomasmarshall
Copy link

@thomasmarshall thomasmarshall commented Dec 15, 2025

The original RBS rewriter runs after the parser has assigned unique names to anonymous parameters, which it can then pull out of the method definition. With the Prism RBS rewriter, we can't generate unique names until later on when the translator is run. We can use static names instead as *, **, and & are guaranteed to be unique anyway (in fact this is already the case for the rest param).

The original RBS rewriter runs after the parser has assigned unique
names to anonymous parameters, which it can then pull out of the method
definition. With the Prism RBS rewriter, we can't generate unique names
until later on when the translator is run. We can use static names
instead as `*`, `**`, and `&` are guaranteed to be unique anyway (in
fact this is already the case for the block param).
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.

2 participants