close #7875 add testcase (#17611)

* close #7875 add testcase

* fix
This commit is contained in:
flywind 2021-04-02 17:56:30 +08:00 • committed by GitHub
commit 774e66f3d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

22
tests/macros/t7875.nim Normal file
View file

@ -0,0 +1,22 @@
discard """
nimout: "var mysym`gensym0: MyType[float32]"
joinable: false
"""
import macros
type
MyType[T] = object
# this is totally fine
var mysym: MyType[float32]
macro foobar(): untyped =
let floatSym = bindSym"float32"
result = quote do:
var mysym: MyType[`floatSym`]
echo result.repr
foobar()