Skip to content

Commit

Permalink
Fix a bug (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge authored Jan 20, 2024
1 parent 9fbcb3b commit a0e40de
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Public.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ function _get_symbols(expr::Expr)
num_symbols = length(expr.args)
symbols = Vector{Symbol}(undef, num_symbols)
for (i, arg) in enumerate(expr.args)
if arg isa Symbol
symbols[i] = arg
elseif _valid_macro(arg)
symbols[i] = arg.args[1]
else
throw(ArgumentError("cannot mark `$arg` as public. Try `@compat public foo, bar`."))
end
end
return symbols
end
Expand Down

0 comments on commit a0e40de

Please sign in to comment.