Skip to content

Commit bd0198e

Browse files
committed
add test for #22792
1 parent bce5bbe commit bd0198e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/core.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6025,6 +6025,14 @@ let a = Foo17149()
60256025
@test a === a
60266026
end
60276027

6028+
#issue #22792
6029+
foo_22792(::Type{<:Union{Int8,Int,UInt}}) = 1;
6030+
@test foo_22792(Union{Int,UInt}) == 1
6031+
foo_22792(::Union) = 2;
6032+
@test foo_22792(Union{Int,UInt}) == 1
6033+
@test foo_22792(Union{Int8,UInt}) == 1
6034+
@test foo_22792(Union{Int,UInt}) == 1
6035+
60286036
# issue #25907
60296037
g25907a(x) = x[1]::Integer
60306038
@test g25907a(Union{Int, UInt, Nothing}[1]) === 1

0 commit comments

Comments
 (0)