blob: c0c29238813d896f2be5c53c173f9b1cbb1d8042 (
plain) (
tree)
|
|
# bug #2369
type HashedElem[T] = tuple[num: int, storedVal: ref T]
proc append[T](tab: var seq[HashedElem[T]], n: int, val: ref T) =
#tab.add((num: n, storedVal: val))
var he: HashedElem[T] = (num: n, storedVal: val)
#tab.add(he)
var g: seq[HashedElem[int]] = @[]
proc foo() =
var x: ref int
new(x)
x[] = 77
g.append(44, x)
|