From 2ea0f8a645fffaadcabaa421aca362f13107a379 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Sun, 15 May 2016 10:09:58 +0200 Subject: [PATCH] Fix two Union occurrences to Union{} These did not have any visible consequences apparently. --- base/docs/Docs.jl | 6 +++--- test/docs.jl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/base/docs/Docs.jl b/base/docs/Docs.jl index b0bd638111b6c..7b5ddf4374864 100644 --- a/base/docs/Docs.jl +++ b/base/docs/Docs.jl @@ -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 @@ -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) diff --git a/test/docs.jl b/test/docs.jl index 6208797ebada6..df0728839624b 100644 --- a/test/docs.jl +++ b/test/docs.jl @@ -754,7 +754,7 @@ 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 @@ -762,7 +762,7 @@ let m = @doc(DocsTest.f).meta @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 @@ -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.