You can also mark the whole template with `{.dirty.}`
    
    
    template someCode(): untyped {.dirty.}=
      var
        fname: string = "Mark"
        age: int = 44
    
    someCode()
    
    echo fname # "Mark"
    echo age # 44 Notice both symbols are visible outside the template.
    

See also 
[https://nim-lang.org/docs/manual.html#templates-hygiene-in-templates](https://nim-lang.org/docs/manual.html#templates-hygiene-in-templates)

Reply via email to