summary refs log blame commit diff stats
path: root/tests/generics/t5926.nim
blob: bb14c3af541222ec4776a3f6171935496e823103 (plain) (tree)





















                            
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)