Skip to content

Commit

Permalink
test subtypes(::UnionAll)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Petviashvili authored and yuyichao committed Feb 1, 2017
1 parent 21c1415 commit 9524cc0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -638,3 +638,11 @@ let
@test @inferred wrapperT(Union{ReflectionExample{Union{},1},ReflectionExample{Float64,1}}) == ReflectionExample
@test_throws ErrorException Base.typename(Union{Int, Float64})
end

# Issue #20086
abstract A20086{T,N}
immutable B20086{T,N} <: A20086{T,N} end
@test subtypes(A20086) == [B20086]
@test subtypes(A20086{Int}) == [B20086{Int}]
@test subtypes(A20086{T,3} where T) == [B20086{T,3} where T]
@test subtypes(A20086{Int,3}) == [B20086{Int,3}]

0 comments on commit 9524cc0

Please sign in to comment.