summary refs log tree commit diff stats
path: root/tests/template/tgenerictemplates.nim
blob: 2c83bc0ecbc19a928adaaddca7aa7894210b0365 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
type
  SomeObj = object of RootObj

  Foo[T, U] = object
    x: T
    y: U

template someTemplate[T](): tuple[id: int32, obj: T] =
  var result: tuple[id: int32, obj: T] = (0'i32, T())
  result

let ret = someTemplate[SomeObj]()