From c6d705ec07ed247203a88e57f454463a65ba3e72 Mon Sep 17 00:00:00 2001 From: Joe Petviashvili Date: Tue, 17 Jan 2017 13:07:07 -0800 Subject: [PATCH] test subtypes(::UnionAll) --- test/reflection.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/reflection.jl b/test/reflection.jl index 3c6ed9b4d25bd..aad3b2a6ddebc 100644 --- a/test/reflection.jl +++ b/test/reflection.jl @@ -612,3 +612,12 @@ end @generated f18883() = nothing @test !isempty(sprint(io->code_llvm(io, f18883, Tuple{}))) @test !isempty(sprint(io->code_native(io, f18883, Tuple{}))) + +# Issue #20086 +@test subtypes(Integer) == [BigInt, Bool, Signed, Unsigned] +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}]