diff options
author | flywind <xzsflywind@gmail.com> | 2021-04-02 17:56:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-02 11:56:30 +0200 |
commit | 774e66f3d123520c44016ca23fd103538fc3c87d (patch) | |
tree | 83fd9017319533eea83191f428d2fe639f069345 /tests | |
parent | 792a03b7561195b27f5ad2b9654781cc17b86c75 (diff) | |
download | Nim-774e66f3d123520c44016ca23fd103538fc3c87d.tar.gz |
close #7875 add testcase (#17611)
* close #7875 add testcase * fix
Diffstat (limited to 'tests')
-rw-r--r-- | tests/macros/t7875.nim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/macros/t7875.nim b/tests/macros/t7875.nim new file mode 100644 index 000000000..7b6e47b86 --- /dev/null +++ b/tests/macros/t7875.nim @@ -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() |