-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for if/switch expressions
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.
- Loading branch information
1 parent
1c58633
commit f3063c6
Showing
3 changed files
with
283 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters