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

Fix docstring for Val(c) in order that c accepts a Symbol #36908

Merged
merged 1 commit into from
Aug 12, 2020

Conversation

kimikage
Copy link
Contributor

@kimikage kimikage commented Aug 4, 2020

This was mentioned on the slack. Even though a Symbol instance is not an isbits value, Val{:symbol} is valid.

Strictly speaking, a value of the composite type consisting of symbols and isbits values ​​is also available. However, I prefer simplicity here to strictness. I don't know whether there are any exceptions other than the Symbol.

julia> isbits(:symbol)
false

julia> Val(:symbol)
Val{:symbol}()

julia> isbits((:foo, 1))
false

julia> Val((:foo, 1))
Val{(:foo, 1)}()

@JeffBezanson JeffBezanson merged commit d28b737 into JuliaLang:master Aug 12, 2020
@kimikage kimikage deleted the docs-val-for-symbol branch November 10, 2020 13:04
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