t7875.nim 321 B

1234567891011121314151617181920212223
  1. discard """
  2. nimout: "var mysym`gensym0: MyType[float32]"
  3. joinable: false
  4. """
  5. import macros
  6. type
  7. MyType[T] = object
  8. # this is totally fine
  9. var mysym: MyType[float32]
  10. macro foobar(): untyped =
  11. let floatSym = bindSym"float32"
  12. result = quote do:
  13. var mysym: MyType[`floatSym`]
  14. echo result.repr
  15. foobar()