From bd0198e7aa4e602831e613da9936408c3395ee10 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Thu, 5 Apr 2018 09:31:36 +0200 Subject: [PATCH] add test for #22792 --- test/core.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/core.jl b/test/core.jl index 1353c1b99b433..3a9867ccdaa2d 100644 --- a/test/core.jl +++ b/test/core.jl @@ -6025,6 +6025,14 @@ let a = Foo17149() @test a === a end +#issue #22792 +foo_22792(::Type{<:Union{Int8,Int,UInt}}) = 1; +@test foo_22792(Union{Int,UInt}) == 1 +foo_22792(::Union) = 2; +@test foo_22792(Union{Int,UInt}) == 1 +@test foo_22792(Union{Int8,UInt}) == 1 +@test foo_22792(Union{Int,UInt}) == 1 + # issue #25907 g25907a(x) = x[1]::Integer @test g25907a(Union{Int, UInt, Nothing}[1]) === 1