mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 02:12:11 +00:00
23 lines
254 B
Nim
23 lines
254 B
Nim
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)
|