Skip to content

Commit

Permalink
Fix two Union occurrences to Union{}
Browse files Browse the repository at this point in the history
These did not have any visible consequences apparently.
  • Loading branch information
nalimilan committed May 15, 2016
1 parent 91c0db7 commit 2ea0f8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions base/docs/Docs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ end
Returns all documentation that matches both `binding` and `sig`.
"""
function doc(binding::Binding, sig::Type = Union)
function doc(binding::Binding, sig::Type = Union{})
results, groups = DocStr[], MultiDoc[]
# Lookup `binding` and `sig` for matches in all modules of the docsystem.
for mod in modules
Expand Down Expand Up @@ -280,8 +280,8 @@ function doc(binding::Binding, sig::Type = Union)
end

# Some additional convenience `doc` methods that take objects rather than `Binding`s.
doc(object, sig::Type = Union) = doc(aliasof(object, typeof(object)), sig)
doc(object, sig...) = doc(object, Tuple{sig...})
doc(object, sig::Type = Union{}) = doc(aliasof(object, typeof(object)), sig)
doc(object, sig...) = doc(object, Tuple{sig...})

"""
Docs.fielddoc(binding, field)
Expand Down
6 changes: 3 additions & 3 deletions test/docs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -754,15 +754,15 @@ let m = @doc(DocsTest).meta
@test length(m[:results]) == 1
@test m[:results][1] === Docs.meta(DocsTest)[@var(DocsTest)].docs[Union{}]
@test m[:binding] == @var(DocsTest)
@test m[:typesig] == Union
@test m[:typesig] === Union{}
end

let m = @doc(DocsTest.f).meta
@test length(m[:results]) == 2
@test m[:results][1] === Docs.meta(DocsTest)[@var(DocsTest.f)].docs[Tuple{Any}]
@test m[:results][2] === Docs.meta(DocsTest)[@var(DocsTest.f)].docs[Tuple{Any, Any}]
@test m[:binding] == @var(DocsTest.f)
@test m[:typesig] == Union
@test m[:typesig] === Union{}
end

let m = @doc(DocsTest.f(x)).meta
Expand All @@ -775,7 +775,7 @@ end
let m = @doc(Undocumented.f).meta
@test isempty(m[:results])
@test m[:binding] == @var(Undocumented.f)
@test m[:typesig] == Union
@test m[:typesig] === Union{}
end

# Bindings.
Expand Down

0 comments on commit 2ea0f8a

Please sign in to comment.