semtypinst: don't wrap type nodes from expressions in static[T] (#18860)
This commit is contained in:
parent
f8e185fec0
commit
6cd219c3a3
2 changed files with 18 additions and 1 deletions
17
tests/generics/t18859.nim
Normal file
17
tests/generics/t18859.nim
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import macros
|
||||
|
||||
macro symFromDesc(T: typedesc): untyped =
|
||||
let typ = getType(T)
|
||||
typ[1]
|
||||
|
||||
template produceType(T: typedesc): untyped =
|
||||
type
|
||||
XT = object
|
||||
x: symFromDesc(T)
|
||||
|
||||
XT
|
||||
|
||||
type
|
||||
X[T] = produceType(T)
|
||||
|
||||
var x: X[int]
|
||||
Loading…
Add table
Add a link
Reference in a new issue