This commit is contained in:
Zahary Karadjov 2017-04-14 23:54:09 +03:00
commit d578815963
3 changed files with 25 additions and 6 deletions

15
tests/generics/t5683.nim Normal file
View file

@ -0,0 +1,15 @@
discard """
output: "perm: 22 det: 22"
"""
type Matrix[M,N: static[int]] = array[M, array[N, float]]
proc det[M,N](a: Matrix[M,N]): int = N*10 + M
proc perm[M,N](a: Matrix[M,N]): int = M*10 + N
const
a = [ [1.0, 2.0]
, [3.0, 4.0]
]
echo "perm: ", a.perm, " det: ", a.det