topenarraycast.nim 158 B

123456789
  1. proc foo[T](s: var openArray[T]): T =
  2. for x in s: result += x
  3. proc bar(xyz: var seq[int]) =
  4. doAssert 6 == (seq[int](xyz)).foo()
  5. var t = @[1,2,3]
  6. bar(t)