t19349.nim 421 B

1234567891011121314151617181920
  1. discard """
  2. action: "compile"
  3. """
  4. type
  5. Vec3[T: SomeNumber] = object
  6. arr: array[3, T]
  7. var
  8. cfloatArr: array[3, array[3, cfloat]]
  9. cfloatSeq = newSeq[Vec3[cfloat]]()
  10. for row in cfloatArr:
  11. cfloatSeq.add(Vec3[float32](arr: [row[0], row[1], row[2]]))
  12. var
  13. cuintArr: array[3, array[3, cuint]]
  14. cuintSeq = newSeq[Vec3[cuint]]()
  15. for row in cuintArr:
  16. cuintSeq.add(Vec3[uint32](arr: [row[0], row[1], row[2]]))