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

Fill docs for TupleLiteral #12927

Merged

Conversation

straight-shoota
Copy link
Member

Even though it's almost identical to ArrayLiteral, we should still spell out the entire API of TupleLiteral for completeness. Also, it's not quite the same, there are some relevant differences.

src/compiler/crystal/macros.cr Outdated Show resolved Hide resolved
src/compiler/crystal/macros.cr Show resolved Hide resolved
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
Copy link
Contributor

@HertzDevil HertzDevil left a comment

Choose a reason for hiding this comment

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

Perhaps we should also mention that some of these macro methods could produce empty TupleLiterals (e.g. select { false }) which, at this moment, are guaranteed to be a syntax error whenever interpolated.

Also, not exactly related to this PR, but TupleLiteral#[]='s error message still refers to ArrayLiteral.

@straight-shoota straight-shoota added this to the 1.8.0 milestone Jan 17, 2023
@straight-shoota straight-shoota merged commit 84977e4 into crystal-lang:master Jan 18, 2023
@straight-shoota straight-shoota deleted the docs/tuple_literal branch January 18, 2023 11:52
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants