JuliaLang / AllocCheck.jl

AllocCheck
Other
221 stars 8 forks source link

Kwargs in anonymous function #56

Open tecosaur opened 10 months ago

tecosaur commented 10 months ago

So, I've hit another kwargs related bug with what I hope is a fairly self-explanatory MWE.

julia> using AllocCheck

julia> @check_allocs (k) -> (k * 2)
#4 (generic function with 1 method)

julia> @check_allocs (; k) -> (k * 2)
ERROR: UndefVarError: `#8` not defined
Stacktrace:
 [1] macro expansion
   @ ~/.julia/packages/AllocCheck/xTVrb/src/macro.jl:154 [inlined]
 [2] top-level scope
   @ REPL[3]:1