Closed
Description
Using byaddr
in a template does not compile while the same code inside a block
works.
Example
import std/decls
template test(x: string)=
var y {.byaddr.} = x
echo y
var xx = "123"
test(xx)
Current Output
template/generic instantiation of `test` from here
Error: invalid pragma: byaddr
Expected Output
123
$ nim -v
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2020-11-11
Copyright (c) 2006-2020 by Andreas Rumpf
git hash: bbe49a14ae827b6474d692042406716a3b3dd71f
active boot switches: -d:release