summary refs log blame commit diff stats
path: root/tests/compiles/tevilcompiles.nim
blob: 0930507d16f1b98fc69f54d31c13bfde30d29b7d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
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)