On Wed, Mar 9, 2016 at 9:53 PM, Julia Tylors <[email protected]> wrote:
> Hi fellows,
>
> func = macroexpand(fdef);
> editDownload(expand(func))
>
>
>
> function editDownload(func::Expr)
>                  Helper.replace(func) do expr
> if isa(expr,Expr) && expr.head == :call
>                                 func = expr.args[1] #
> (top(getfield))(Main.Download,:task)
> if func == GlobalRef(Download,:task) # this is always returning false
> end
> end
> nothing
> end
> end
>
>
> I am doing some operations on the lowered AST. and for some reason the
> comparison for the GlobalRef doesn't work.
> and I can't figure out why.

I'm not sure what's the best way to do what you want but it is
expected that the two AST you are comparing are not the same thing.

>
> Can you help me out?
>
> Thanks

Reply via email to