fixes #1055
This commit is contained in:
parent
f7dca91344
commit
8349cee613
5 changed files with 56 additions and 15 deletions
12
tests/compiles/tevilcompiles.nim
Normal file
12
tests/compiles/tevilcompiles.nim
Normal file
|
|
@ -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)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue