Skip to content

Commit a50daf4

Browse files
committed
Add explicit else with error
1 parent 0fd456f commit a50daf4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/utilities.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ function printmethod(buffer::IOBuffer, binding::Docs.Binding, func, method::Meth
285285
return t
286286
elseif t isa UnionAll
287287
return f(t.body)
288+
else
289+
error("Expected `typeof($t)` to be `Tuple` or `UnionAll` but found `$typeof(t)`")
288290
end
289291
end
290292

0 commit comments

Comments
 (0)