summary refs log tree commit diff stats
path: root/tests/macros/t7875.nim
blob: 7b6e47b865789e94380ef7a8a6ce51e78f9d747f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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()