Skip to content

Commit 6f47edf

Browse files
committed
scopes: Disallow constructing empty UnionScope
1 parent a3b6a45 commit 6f47edf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/scopes.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ struct UnionScope <: AbstractScope
4040
push!(scope_set, scope)
4141
end
4242
end
43+
if isempty(scope_set)
44+
throw(ArgumentError("Cannot construct UnionScope with no inner scopes"))
45+
end
4346
return new((collect(scope_set)...,))
4447
end
4548
end

0 commit comments

Comments
 (0)