Skip to content

Commit ad2a222

Browse files
committed
Add a test throws an error by invalid subtyping in definition (JuliaLang#20523)
1 parent ddb1e1e commit ad2a222

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/subtype.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,3 +911,6 @@ ftwoparams(::TwoParams{<:Real,<:Real}) = 3
911911
@test TwoParams{Real,Complex}(3,0im) isa TwoParams{>:Int,<:Number}
912912
@test !(TwoParams(3.0,0im) isa TwoParams{>:Int,<:Number})
913913
@test !(TwoParams(3,'x') isa TwoParams{>:Int,<:Number})
914+
915+
# Issue #20523
916+
@test_throws ErrorException immutable A20523 <: Base.AbstractSet; end

0 commit comments

Comments
 (0)