Skip to content

Commit c326b1c

Browse files
wookaytkelman
authored andcommitted
Add a test throws an error by invalid subtyping in definition (#19414) (#20548)
1 parent 6d76c23 commit c326b1c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/subtype.jl

+5
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,11 @@ end
10711071
Tuple{C20992{S, n, T, D, d} where d where D where T where n where S, Any},
10721072
Tuple{C20992, Int})
10731073

1074+
# Issue #19414
1075+
let ex = try struct A19414 <: Base.AbstractSet end catch e; e end
1076+
@test isa(ex, ErrorException) && ex.msg == "invalid subtyping in definition of A19414"
1077+
end
1078+
10741079
# issue #20103, OP and comments
10751080
struct TT20103{X,Y} end
10761081
f20103{X,Y}(::Type{TT20103{X,Y}},x::X,y::Y) = 1

0 commit comments

Comments
 (0)