mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-14 23:33:28 +00:00
fix a compilation error in linalg
This commit is contained in:
@@ -13,3 +13,19 @@ const
|
||||
]
|
||||
|
||||
echo "perm: ", a.perm, " det: ", a.det
|
||||
|
||||
# This tests multiple instantiations of a generic
|
||||
# proc involving static params:
|
||||
type
|
||||
Vector64*[N: static[int]] = ref array[N, float64]
|
||||
Array64[N: static[int]] = array[N, float64]
|
||||
|
||||
proc vector*[N: static[int]](xs: Array64[N]): Vector64[N] =
|
||||
new result
|
||||
for i in 0 .. < N:
|
||||
result[i] = xs[i]
|
||||
|
||||
let v1 = vector([1.0, 2.0, 3.0, 4.0, 5.0])
|
||||
let v2 = vector([1.0, 2.0, 3.0, 4.0, 5.0])
|
||||
let v3 = vector([1.0, 2.0, 3.0, 4.0])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user