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

Cannot use dot syntax for Defaults.publisher(keys:) #50

Closed
sindresorhus opened this issue Jun 9, 2020 · 1 comment
Closed

Cannot use dot syntax for Defaults.publisher(keys:) #50

sindresorhus opened this issue Jun 9, 2020 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@sindresorhus
Copy link
Owner

This compiles:

extension Defaults.Keys {
	static let key = Key<Bool>("key", default: false)
	static let key2 = Key<Int>("key2", default: 1)
}

Defaults.publisher(keys: Defaults.Keys.key, Defaults.Keys.key2)

This does not:

extension Defaults.Keys {
	static let key = Key<Bool>("key", default: false)
	static let key2 = Key<Int>("key2", default: 1)
}

Defaults.publisher(keys: .key, .key2)
@sindresorhus sindresorhus added bug Something isn't working help wanted Extra attention is needed labels Jun 9, 2020
fredyshox added a commit to fredyshox/Defaults that referenced this issue Aug 11, 2020
Keys conformance to BaseKey
@sindresorhus
Copy link
Owner Author

Fixed by #49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant