Skip to content

Implement inline switch cases - #12979

Merged
andrewrk merged 10 commits into
ziglang:masterfrom
Vexu:inline-switch
Oct 4, 2022
Merged

andrewrk merged 10 commits into
ziglang:masterfrom
Vexu:inline-switch

Conversation

@Vexu

@Vexu Vexu commented Sep 26, 2022

Copy link
Copy Markdown
Member

I haven't implemented inline else yet but otherwise this should be ready for initial comments/reviews.

Closes #7224

@Vexu

Vexu commented Sep 27, 2022

Copy link
Copy Markdown
Member Author

This should now be ready.

@andrewrk

Copy link
Copy Markdown
Member

Magnificent. I haven't had a chance to look over this closely yet, but I'm quite excited about it.

@topolarity

Copy link
Copy Markdown
Contributor

This looks great! Been playing around with this on my machine and I'm very happy with it

One tiny design question: Should inline else and inline _ be supported for non-exhaustive enums, the same way we support inline else for integers?

@andrewrk
andrewrk merged commit ff534d2 into ziglang:master Oct 4, 2022
@Vexu
Vexu deleted the inline-switch branch October 4, 2022 10:39
TUSF pushed a commit to TUSF/zig that referenced this pull request May 9, 2024
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.

Proposal: Inline Switch Cases

3 participants