diff options
author | Araq <rumpf_a@web.de> | 2014-11-16 20:32:05 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-11-16 20:32:05 +0100 |
commit | 8349cee613e971525b7c21aeee16eac41decd139 (patch) | |
tree | 134ddc3485c7a5fb42a035a38935511035b9cf75 /tests/compiles | |
parent | f7dca91344392a200392bdbd5d2d7c5167298e93 (diff) | |
download | Nim-8349cee613e971525b7c21aeee16eac41decd139.tar.gz |
fixes #1055
Diffstat (limited to 'tests/compiles')
-rw-r--r-- | tests/compiles/tevilcompiles.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/compiles/tevilcompiles.nim b/tests/compiles/tevilcompiles.nim new file mode 100644 index 000000000..0930507d1 --- /dev/null +++ b/tests/compiles/tevilcompiles.nim @@ -0,0 +1,12 @@ +# bug #1055 +import unittest +type TMatrix*[N,M: static[int], T] = object + data*: array[0..N*M-1, T] +proc `==`*(a: distinct TMatrix; b: distinct TMatrix): bool = + result = a.data == b.data + +test "c": + var a = TMatrix[2,2,int](data: [1,2,3,4]) + var b = TMatrix[2,2,int](data: [1,2,3,4]) + check(a == b) + |