Skip to content

Fix () -> (void) being rejected as SyntaxError#2884

Merged
ksss merged 1 commit intoruby:masterfrom
ksss:fix-void-in-paren
Mar 18, 2026
Merged

Fix () -> (void) being rejected as SyntaxError#2884
ksss merged 1 commit intoruby:masterfrom
ksss:fix-void-in-paren

Conversation

@ksss
Copy link
Collaborator

@ksss ksss commented Mar 17, 2026

void_allowed was hardcoded to false when parsing a parenthesized type, causing (void) to be rejected even in return type positions where void is valid.

`void_allowed` was hardcoded to `false` when parsing a parenthesized
type, causing `(void)` to be rejected even in return type positions
where `void` is valid.
Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

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

💯

@soutaro soutaro added this to the RBS 4.0.x milestone Mar 17, 2026
@ksss ksss merged commit 1dc62ef into ruby:master Mar 18, 2026
26 checks passed
@ksss ksss deleted the fix-void-in-paren branch March 18, 2026 00:47
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