We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
default
There's no way to prevent it today, but maybe when Swift supports macros or constant expressions.
I have seen many users do:
static let interval = Key<Double?>("interval", default: nil)
The default parameter is moot in this case.
Or even worse:
static let interval = Key<Double?>("interval", default: 4)
Which has the incorrect behavior by never allowing the value to be set to nil. (The correct solution to this is #54)
nil
The text was updated successfully, but these errors were encountered:
I wonder if we could use a macro to detect this and issue a warning.
Sorry, something went wrong.
No branches or pull requests
There's no way to prevent it today, but maybe when Swift supports macros or constant expressions.
I have seen many users do:
The
default
parameter is moot in this case.Or even worse:
Which has the incorrect behavior by never allowing the value to be set to
nil
. (The correct solution to this is #54)The text was updated successfully, but these errors were encountered: