add testcase for #5926 (#14965)

This commit is contained in:
flywind
2020-07-11 23:09:41 +08:00
committed by GitHub
parent 6d10baa339
commit 21772b6419

22
tests/generics/t5926.nim Normal file
View File

@@ -0,0 +1,22 @@
discard """
action: compile
"""
type
SomeObj[T] = object
template useSomeObj[T]() =
var retObj: SomeObj[T]
useSomeObj[void]()
useSomeObj[int]()
type
Data*[T] = object
x: T
template test*[T](xxx: T) =
let data = Data[T](x: xxx)
test(1)