.inject still works.
import strformat
import macros
macro t1(): untyped =
return quote do:
var i {.inject.} = 10 # add {.inject.} here
echo fmt"i is {i}" # now works
proc p1() =
t1()
when isMainModule:
p1()
Run
- It is annoying that the template doesn't resolve the symbol at te... slangmgh
- It is annoying that the template doesn't resolve the symbol ... Araq
- It is annoying that the template doesn't resolve the sym... slangmgh
- It is annoying that the template doesn't resolve the... slangmgh
- It is annoying that the template doesn't resolve... slangmgh
- It is annoying that the template doesn't re... Alogani
- It is annoying that the template doesn'... slangmgh
