Files
Nim/tests/vm/tref.nim
Oscar Nihlgård 7cf87dfac6 VM fix for refs
2018-05-08 17:00:00 +02:00

12 lines
166 B
Nim

static:
var
a: ref string
b: ref string
new a
a[] = "Hello world"
b = a
b[5] = 'c'
doAssert a[] == "Hellocworld"
doAssert b[] == "Hellocworld"