Skip to content

Fix splat fallback for union types - #467

Merged
mame merged 1 commit into
ruby:masterfrom
pvcresin:fix-splat-union-fallback
Sep 1, 2026
Merged

Fix splat fallback for union types#467
mame merged 1 commit into
ruby:masterfrom
pvcresin:fix-splat-union-fallback

Conversation

@pvcresin

Copy link
Copy Markdown
Contributor

Summary

  • Fix splat fallback for union types.
  • Move the regression scenario into the regular array scenarios.

Details

[*x] now keeps receiver types without to_a separate from the normal to_a result, so each union member can be handled independently. Existing array and tuple inference remains unchanged.

Test

  • bundle exec ruby -Itest test/scenario_test.rb
  • bundle exec rake test

@mame

mame commented Sep 1, 2026

Copy link
Copy Markdown
Member

Thanks! fallback feels like the name from the splat's side; I'd prefer something like unresolved_recv. It's trivial, so let me merge this as is and rename in a follow-up.

@mame
mame merged commit 917ccb0 into ruby:master Sep 1, 2026
6 checks passed
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