From 442bc65ebc5eeee2f78dac4056a78df714f090e9 Mon Sep 17 00:00:00 2001 From: Martin Holters Date: Wed, 24 Apr 2019 15:03:12 +0200 Subject: [PATCH] Add a test for #31696 --- test/core.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/core.jl b/test/core.jl index 9695d06d8f7bf..3d2f0556982e5 100644 --- a/test/core.jl +++ b/test/core.jl @@ -6922,3 +6922,8 @@ struct LL31783{T} end foo31783(tv::TypeVar) = tv.ub == Any ? Union{tv,LL31783{tv}} : tv @test isa(foo31783(TypeVar(:T)),Union) + +# issue #31696 +foo31696(x::Int8, y::Int8) = 1 +foo31696(x::T, y::T) where {T <: Int8} = 2 +@test length(methods(foo31696)) == 1