From b614c3fa4f902a458504144077b04d2929178e46 Mon Sep 17 00:00:00 2001 From: Yichao Yu Date: Fri, 9 Jan 2015 01:05:28 -0500 Subject: [PATCH] add test --- test/show.jl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/show.jl b/test/show.jl index a3ce295ba4da5..4280fb970380b 100644 --- a/test/show.jl +++ b/test/show.jl @@ -200,3 +200,22 @@ end # parametric type instantiation printing immutable TParametricPrint{a}; end @test sprint(show, :(TParametricPrint{false}())) == ":(TParametricPrint{false}())" + +# Pull Request 9635 +abstract InvokeType9635 +abstract MethodType9635 <: InvokeType9635 +type InstanceType9635 <: MethodType9635 +end +let + f9635(::MethodType9635) = nothing + local err::MethodError + try + invoke(f9635, (InvokeType9635,), InstanceType9635()) + catch err + end + buff = IOBuffer() + showerror(buff, err) + err_str = takebuf_string(buff) + @test match(r"::InstanceType9635", err_str) === nothing + @test isa(match(r"::InvokeType9635", err_str), RegexMatch) +end