Skip to content

Comments

Support Slice.literal with inferred element type#15529

Merged
straight-shoota merged 2 commits intocrystal-lang:masterfrom
HertzDevil:feature/slice-literal-infer
Mar 3, 2025
Merged

Support Slice.literal with inferred element type#15529
straight-shoota merged 2 commits intocrystal-lang:masterfrom
HertzDevil:feature/slice-literal-infer

Conversation

@HertzDevil
Copy link
Contributor

For number types other than Int32 the literal suffixes would result in more typing, but if more types are ever supported in slice literals, like tuples, the inferred form would become handy.

@straight-shoota straight-shoota added this to the 1.16.0 milestone Feb 27, 2025
@straight-shoota straight-shoota merged commit 13436a5 into crystal-lang:master Mar 3, 2025
32 checks passed
@HertzDevil HertzDevil deleted the feature/slice-literal-infer branch March 6, 2025 23:17
Blacksmoke16 pushed a commit to Blacksmoke16/crystal that referenced this pull request Mar 18, 2025
For number types other than `Int32` the literal suffixes would result in more typing, but if more types are ever supported in slice literals, like tuples, the inferred form would become handy.
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.

2 participants