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

convert more Union(...) to Union{...} instances that escaped #11432 #12606

Merged
merged 1 commit into from
Aug 14, 2015

Conversation

stevengj
Copy link
Member

This just cleans up more usages of Union(...) that have crept in since #11432 (or were never fixed).

@@ -700,7 +700,7 @@ imply multiplication:
julia> (x-1)(x+1)
ERROR: MethodError: `call` has no method matching call(::Int64, ::Int64)
Closest candidates are:
Union(!Matched::Any...)
Union{!Matched::Any...}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you also changing the printing here? If not then this'll make the doctest fail.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed; I'm not sure how to change the printing, so I just left the docs with parens for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this one just happens to be a bit strange, and the parens are actually fairly correct (since it is specifically matching call(::Type{Union}, args...) = Union{args...} in essentials.jl:9). I think the bigger confusion there comes from the printing of call in prefix notation, but without the indication that the function itself didn't actually match.

vtjnash added a commit that referenced this pull request Aug 14, 2015
convert more Union(...) to Union{...} instances that escaped #11432
@vtjnash vtjnash merged commit e37f632 into JuliaLang:master Aug 14, 2015
@stevengj stevengj deleted the Union_brace branch August 14, 2015 12:42
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.

3 participants