diff options
author | Zahary Karadjov <zahary@gmail.com> | 2015-01-02 17:51:08 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2015-01-02 23:58:24 +0200 |
commit | b21b72dc14e389cb2d31646dc25a5ae0808a43a1 (patch) | |
tree | 5e631889f273b2893a558ecc92a3bd848775b20f /tests | |
parent | 70b5efa98de87bd7684b7258cb95fb2b9892b6df (diff) | |
download | Nim-b21b72dc14e389cb2d31646dc25a5ae0808a43a1.tar.gz |
fix #1049
Diffstat (limited to 'tests')
-rw-r--r-- | tests/metatype/tstaticparams.nim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/metatype/tstaticparams.nim b/tests/metatype/tstaticparams.nim index 6d7c569e0..b34eaa211 100644 --- a/tests/metatype/tstaticparams.nim +++ b/tests/metatype/tstaticparams.nim @@ -56,3 +56,21 @@ type TTestSub[N: static[int]] = TTest[1, N] var z: TTestSub[2] echo z.high + +# issue 1049 +proc matrix_1*[M, N, T](mat: Matrix[M,N,T], a: array[N, int]) = discard +proc matrix_2*[M, N, T](mat: Matrix[M,N,T], a: array[N+1, int]) = discard + +proc matrix_3*[M, N: static[int]; T](mat: Matrix[M,N,T], a: array[N, int]) = discard +proc matrix_4*[M, N: static[int]; T](mat: Matrix[M,N,T], a: array[N+1, int]) = discard + +var + tmat: TMatrix[4,4,int] + ar1: array[4, int] + ar2: array[5, int] + +matrix_1(tmat, ar1) +matrix_2(tmat, ar2) +matrix_3(tmat, ar1) +matrix_4(tmat, ar2) + |