summary refs log tree commit diff stats
path: root/tests/alias/t19349.nim
blob: 1e1e58264202db3b3da51fa6947887e9c5c89b7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
discard """
  action: "compile"
"""

type
  Vec3[T: SomeNumber] = object
    arr: array[3, T]

var 
  cfloatArr: array[3, array[3, cfloat]]
  cfloatSeq = newSeq[Vec3[cfloat]]()
for row in cfloatArr:
  cfloatSeq.add(Vec3[float32](arr: [row[0], row[1], row[2]]))

var 
  cuintArr: array[3, array[3, cuint]]
  cuintSeq = newSeq[Vec3[cuint]]()
for row in cuintArr:
  cuintSeq.add(Vec3[uint32](arr: [row[0], row[1], row[2]]))