VM fix for refs

This commit is contained in:
Oscar Nihlgård
2018-05-08 12:02:48 +02:00
committed by Andreas Rumpf
parent 6758fbd06e
commit 7cf87dfac6
2 changed files with 20 additions and 2 deletions

12
tests/vm/tref.nim Normal file
View File

@@ -0,0 +1,12 @@
static:
var
a: ref string
b: ref string
new a
a[] = "Hello world"
b = a
b[5] = 'c'
doAssert a[] == "Hellocworld"
doAssert b[] == "Hellocworld"