From c55e275f4e9e587039b732cf4cf2493fbb8cfb19 Mon Sep 17 00:00:00 2001 From: WooKyoung Noh Date: Fri, 10 Feb 2017 05:13:48 +0900 Subject: [PATCH] Add a test throws an error by invalid subtyping in definition (#19414) --- test/subtype.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/subtype.jl b/test/subtype.jl index 93962697141c3..762259cb02820 100644 --- a/test/subtype.jl +++ b/test/subtype.jl @@ -1003,3 +1003,8 @@ end @testintersect(Tuple{A20992{R, D, d} where d where D, Int} where R, Tuple{C20992{S, n, T, D, d} where d where D where T where n where S, Any}, Tuple{C20992, Int}) + +# Issue #19414 +let ex = try struct A19414 <: Base.AbstractSet end catch e; e end + @test isa(ex, ErrorException) && ex.msg == "invalid subtyping in definition of A19414" +end