t20289.nim 250 B

12345678910111213141516
  1. discard """
  2. action: reject
  3. """
  4. type E[T] = object
  5. v: T
  6. template j[T](R: type E[T], x: untyped): R = R(v: x)
  7. template d[T](O: type E, v: T): E[T] = E[T].j(v)
  8. proc w[T](): E[T] =
  9. template r(k: int): auto = default(T)
  10. E.d r
  11. discard w[int]()