mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
16 lines
250 B
Nim
16 lines
250 B
Nim
discard """
|
|
action: reject
|
|
"""
|
|
|
|
type E[T] = object
|
|
v: T
|
|
|
|
template j[T](R: type E[T], x: untyped): R = R(v: x)
|
|
template d[T](O: type E, v: T): E[T] = E[T].j(v)
|
|
|
|
proc w[T](): E[T] =
|
|
template r(k: int): auto = default(T)
|
|
E.d r
|
|
|
|
discard w[int]()
|