Underscores.jl icon indicating copy to clipboard operation
Underscores.jl copied to clipboard

Underscore replacement should recurse into quasiquote

Open c42f opened this issue 5 years ago • 0 comments

Expr(:quote) is actually a quasiquote, so the following should be equivalent:

julia> map(i->:(a[$i]), 1:4)
4-element Array{Expr,1}:
 :(a[1])
 :(a[2])
 :(a[3])
 :(a[4])

julia> @_ map(:(a[$_]), 1:4)
ERROR: syntax: all-underscore identifier used as rvalue
Stacktrace:
 [1] top-level scope at REPL[2]:1

c42f avatar Apr 27 '20 01:04 c42f