tdeprecated.nim 236 B

1234567891011
  1. # bug #6436
  2. proc foo(size: int, T: typedesc): seq[T] {.deprecated.}=
  3. result = newSeq[T](size)
  4. proc foo[T](size: int): seq[T]=
  5. result = newSeq[T](size)
  6. let bar = foo[int](3) # Warning foo is deprecated
  7. doAssert bar == @[0, 0, 0]