summary refs log blame commit diff stats
path: root/tests/assign/tgenericassign.nim
blob: bd9c6c21b3e9e8dfe67ccb2352a6571675ee16f5 (plain) (tree)
1
2
3
4
5
6
7
8
9







                         
 














                                                
discard """
  output: '''came here'''
"""

type
  TAny* = object {.pure.}
    value*: pointer
    rawType: pointer

proc newAny(value, rawType: pointer): TAny =
  result.value = value
  result.rawType = rawType

var name: cstring = "example"

var ret: seq[tuple[name: string, a: TAny]] = @[]
for i in 0..8000:
  var tup = ($name, newAny(nil, nil))
  assert(tup[0] == "example")
  ret.add(tup)
  assert(ret[ret.len()-1][0] == "example")

echo "came here"