Skip to content

Commit

Permalink
Don't explore inbounds expressions (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pangoraw authored Jan 8, 2025
1 parent 6c260ee commit ccc7f47
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "ExpressionExplorer"
uuid = "21656369-7473-754a-2065-74616d696c43"
license = "MIT"
authors = ["Paul Berg <[email protected]>", "Fons van der Plas <[email protected]>"]
version = "1.1.0"
version = "1.1.1"

[compat]
julia = "1.10"
Expand Down
2 changes: 1 addition & 1 deletion src/explore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ function explore!(ex::Expr, scopestate::ScopeState)::SymbolsState
elseif Meta.isexpr(ex, Symbol("'"), 1)
# a' corresponds to adjoint(a)
return explore!(Expr(:call, :adjoint, ex.args[1]), scopestate)
elseif ex.head === :meta
elseif Meta.isexpr(ex, :meta) || Meta.isexpr(ex, :inbounds)
return SymbolsState()
else
return explore_fallback!(ex, scopestate)
Expand Down
6 changes: 6 additions & 0 deletions test/ExpressionExplorer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,12 @@ end
expr=:(@mymacro a <: b = 2),
macrocalls=[Symbol("@mymacro")],
)

@test test_expression_explorer(
expr=@macroexpand(@inbounds a[i] = 2x),
references=[:a, :i, :x],
funccalls=[:*],
)
end
@testset "Module imports" begin
@test test_expression_explorer(
Expand Down

2 comments on commit ccc7f47

@Pangoraw
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/122574

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.1 -m "<description of version>" ccc7f4730d3571081bd307b9b9888ed357546035
git push origin v1.1.1

Please sign in to comment.