Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support splats inside tuple literals in type names #10430

Merged

Conversation

HertzDevil
Copy link
Contributor

Follow-up to #3718. Whenever a type name is expected, the following:

{*A, *{B, C}}

is now expanded to:

::Tuple(*A, *::Tuple(B, C))

Such splats inside explicit Tuple generics have already been supported in many places, so this is purely a grammar change.

@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic topic:lang:type-system labels Feb 20, 2021
Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

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

Thank you @HertzDevil 🙏

@straight-shoota straight-shoota added this to the 1.0.0 milestone Mar 17, 2021
@bcardiff bcardiff merged commit bbaabb2 into crystal-lang:master Mar 19, 2021
@HertzDevil HertzDevil deleted the feature/tuple-type-name-splat branch March 20, 2021 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic topic:lang:type-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants