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 OptionSet macro to help build option sets #17

Merged
merged 3 commits into from
Mar 3, 2023
Merged

Conversation

DougGregor
Copy link
Owner

Add an OptionSet macro that can be used like this:

@OptionSet
struct ShippingOptions {
  private enum Options: Int {
    case nextDay
    case secondDay
    case priority
    case standard
  }
}

to build a proper option set.

@DougGregor
Copy link
Owner Author

This requires the March 2nd snapshot. Merging now that that's available.

@DougGregor DougGregor merged commit 6a80954 into main Mar 3, 2023
@DougGregor DougGregor deleted the option-set branch March 3, 2023 20:25
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.

None yet

2 participants