Any how, i got rid of begin - end encomppasing the download_task, it is solved it seems there is a difference between quote GENERATED EXPR end and :(GENERATED EXPR) Interesting....
On Thursday, March 10, 2016 at 10:14:32 AM UTC-8, Julia Tylors wrote: > > Hi fellows; > > I have a function generated using macro, and when i try to run it with > test(1.2,2.1) , it gives me the error: > > ERROR: error compiling test: unsupported or misplaced expression "block" > in function test > > test.env.defs.func.code : > > AST(:($(Expr(:lambda, Any[:x,:y], > Any[Any[Any[:x,:Any,1],Any[:y,:Any,1],Any[:v1,:Any,7],Any[:v2,:Any,7]],Any[],0,Any[]], > > :(begin > NewvarNode(:v1) > NewvarNode(:v2) > v1 = 2.1 > v2 = 2.2 > begin > $(Expr(:(=), :v1, :v2, > :(((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(##7894,x,y,v1,v2)))) > end > return v1 + v2 > end))))) > > > How can i debug this thing? I can't put my finger on the problem. the AST > seems normal to me.... > > > Thanks >
