tevilcompiles.nim 305 B

12345678910111213
  1. # bug #1055
  2. import unittest
  3. type TMatrix*[N,M: static[int], T] = object
  4. data*: array[0..N*M-1, T]
  5. proc `==`*(a: distinct TMatrix; b: distinct TMatrix): bool =
  6. result = a.data == b.data
  7. test "c":
  8. var a = TMatrix[2,2,int](data: [1,2,3,4])
  9. var b = TMatrix[2,2,int](data: [1,2,3,4])
  10. check(a == b)