Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug #6

Merged
merged 1 commit into from
Jan 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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]

Check warning on line 49 in src/Public.jl

View check run for this annotation

Codecov / codecov/patch

src/Public.jl#L46-L49

Added lines #L46 - L49 were not covered by tests
else
throw(ArgumentError("cannot mark `$arg` as public. Try `@compat public foo, bar`."))

Check warning on line 51 in src/Public.jl

View check run for this annotation

Codecov / codecov/patch

src/Public.jl#L51

Added line #L51 was not covered by tests
end
end
return symbols
end
Expand Down
Loading