mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 06:18:51 +00:00
22
tests/macros/t7875.nim
Normal file
22
tests/macros/t7875.nim
Normal 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()
|
||||
Reference in New Issue
Block a user