Skip to content

Commit

Permalink
Add a test throws an error by invalid subtyping in definition (#19414) (
Browse files Browse the repository at this point in the history
  • Loading branch information
wookay authored and tkelman committed Apr 26, 2017
1 parent 6d76c23 commit c326b1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/subtype.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,11 @@ end
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

# issue #20103, OP and comments
struct TT20103{X,Y} end
f20103{X,Y}(::Type{TT20103{X,Y}},x::X,y::Y) = 1
Expand Down

0 comments on commit c326b1c

Please sign in to comment.