template bar() =
      echo a
    
    template foo() {.dirty.}  =
      let a = 5
      bar()
    
    foo()
    echo a
    

I would expect exactly that behaviour. As templates a hygienic by default, we 
need dirty pragma for foo() to make variable visible outside. 

Reply via email to