Skip to content

Commit 9524cc0

Browse files
Joe Petviashviliyuyichao
Joe Petviashvili
authored andcommitted
test subtypes(::UnionAll)
1 parent 21c1415 commit 9524cc0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/reflection.jl

+8
Original file line numberDiff line numberDiff line change
@@ -638,3 +638,11 @@ let
638638
@test @inferred wrapperT(Union{ReflectionExample{Union{},1},ReflectionExample{Float64,1}}) == ReflectionExample
639639
@test_throws ErrorException Base.typename(Union{Int, Float64})
640640
end
641+
642+
# Issue #20086
643+
abstract A20086{T,N}
644+
immutable B20086{T,N} <: A20086{T,N} end
645+
@test subtypes(A20086) == [B20086]
646+
@test subtypes(A20086{Int}) == [B20086{Int}]
647+
@test subtypes(A20086{T,3} where T) == [B20086{T,3} where T]
648+
@test subtypes(A20086{Int,3}) == [B20086{Int,3}]

0 commit comments

Comments
 (0)