diff --git a/src/JET.jl b/src/JET.jl index 3c522a5f5..5fbe7e6c1 100644 --- a/src/JET.jl +++ b/src/JET.jl @@ -153,10 +153,6 @@ end islnn(@nospecialize(x)) = isa(x, LineNumberNode) -# for inspection -macro lwr(ex) QuoteNode(lower(__module__, ex)) end -macro src(ex) QuoteNode(first(lower(__module__, ex).args)) end - """ @withmixedhash (mutable) struct T fields ... diff --git a/test/setup.jl b/test/setup.jl index 4cc688af0..ebfa67bf7 100644 --- a/test/setup.jl +++ b/test/setup.jl @@ -34,3 +34,7 @@ function test_sum_over_string(ers) end test_sum_over_string(res::JET.JETCallResult) = test_sum_over_string(get_reports_with_test(res)) test_sum_over_string(res::JET.JETToplevelResult) = test_sum_over_string(get_reports_with_test(res)) + +# for inspection +macro lwr(ex) QuoteNode(Meta.lower(__module__, ex)) end +macro src(ex) QuoteNode(only(Meta.lower(__module__, ex).args)) end diff --git a/test/toplevel/test_virtualprocess.jl b/test/toplevel/test_virtualprocess.jl index fee8bb4cb..b5c682fe1 100644 --- a/test/toplevel/test_virtualprocess.jl +++ b/test/toplevel/test_virtualprocess.jl @@ -1696,8 +1696,7 @@ end # simple negative case test, which checks we do NOT select statements not involved with any definition # this particular example is adapted from https://en.wikipedia.org/wiki/Program_slicing - let - src = JET.@src let + let src = @src let sum = 0 product = 1 # should NOT be selected w = 7