Skip to content

Commit

Permalink
Add a test throws an error by invalid subtyping in definition (JuliaL…
Browse files Browse the repository at this point in the history
  • Loading branch information
wookay committed Feb 9, 2017
1 parent ddb1e1e commit 6450075
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/subtype.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6450075

Please sign in to comment.