From ad2a2227948415d0fbde0176e53716fe2ab8baf3 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 (#20523) --- test/subtype.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/subtype.jl b/test/subtype.jl index d8c6e6e53df4c9..cfe69037483cd7 100644 --- a/test/subtype.jl +++ b/test/subtype.jl @@ -911,3 +911,6 @@ ftwoparams(::TwoParams{<:Real,<:Real}) = 3 @test TwoParams{Real,Complex}(3,0im) isa TwoParams{>:Int,<:Number} @test !(TwoParams(3.0,0im) isa TwoParams{>:Int,<:Number}) @test !(TwoParams(3,'x') isa TwoParams{>:Int,<:Number}) + +# Issue #20523 +@test_throws ErrorException immutable A20523 <: Base.AbstractSet; end