Open dom96 opened 6 years ago
minimalish version:
type Foo = array[0..1, array[0..1, int]]
template Impl =
var b, c: Foo
b = deepCopy(x)
deepCopy(c, x)
assert x == b
assert x == c
proc bar(x: Foo) =
Impl()
proc baz(x: var Foo) =
Impl()
var a: Foo
a[0][0] = 1
bar(a) #works
baz(a) # assertionDefect c!=a