t21532.nim 146 B

12345678
  1. template elementType(a: untyped): typedesc =
  2. typeof(block: (for ai in a: ai))
  3. func fn[T](a: T) =
  4. doAssert elementType(a) is int
  5. @[1,2,3].fn