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

Add support for if/switch expressions #354

Merged
merged 1 commit into from
Feb 13, 2024
Merged

Conversation

alex-pinkus
Copy link
Owner

As pointed out in #351.

SE-0380
made it possible to do this, but support was lacking in this repository.
The fix turned out to be easier than anticipated, simply requiring the
statement to be added in some new places. Theoretically, it should also
be renamed, but that would make this a breaking change.

The proposal does not make clear whether labels are permitted on
expression-position if and switch statements. This assumes they are
not, for simplicity.

As pointed out in #351.

[SE-0380](https://github.com/apple/swift-evolution/blob/main/proposals/0380-if-switch-expressions.md)
made it possible to do this, but support was lacking in this repository.
The fix turned out to be easier than anticipated, simply requiring the
statement to be added in some new places. Theoretically, it should also
be renamed, but that would make this a breaking change.

The proposal does not make clear whether labels are permitted on
expression-position `if` and `switch` statements. This assumes they are
not, for simplicity.
@alex-pinkus alex-pinkus merged commit f3063c6 into main Feb 13, 2024
55 checks passed
@alex-pinkus alex-pinkus deleted the if-switch-expression branch February 13, 2024 04:33
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.

1 participant