Skip to content

Fix RBS translation of braceless shape return types - #644

Merged
Morriar merged 1 commit into
mainfrom
fix-braceless-shape-types
Aug 4, 2026
Merged

Fix RBS translation of braceless shape return types#644
Morriar merged 1 commit into
mainfrom
fix-braceless-shape-types

Conversation

@Morriar

@Morriar Morriar commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #641

  • preserve braceless hash-rocket return shapes by restoring braces around Prism keyword hash nodes
  • distinguish hash rockets from keyword arguments using association operator locations
  • cover string, symbol, mixed-key, single-key, and multi-key shapes
  • keep invalid keyword-argument forms rejected during RBS translation

@Morriar
Morriar requested a review from a team as a code owner August 4, 2026 16:33
Comment thread lib/rbi/parser.rb Outdated
Comment thread lib/rbi/parser.rb
@Morriar
Morriar force-pushed the fix-braceless-shape-types branch from 8f5faf4 to 963fe80 Compare August 4, 2026 18:39
@Morriar
Morriar merged commit 0d8e867 into main Aug 4, 2026
11 checks passed
@Morriar
Morriar deleted the fix-braceless-shape-types branch August 4, 2026 19:14

@Morriar Morriar left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No comments from me. The parser change is small and covered by parser/RBS printer tests.

Comment thread lib/rbi/parser.rb
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.

RBS translation fails for brace-less shape types in sig { returns(...) }

2 participants