summary refs log tree commit diff stats
path: root/tests/vm/tref.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/tref.nim')
-rw-r--r--tests/vm/tref.nim11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/vm/tref.nim b/tests/vm/tref.nim
index f5cd23da5..e70305225 100644
--- a/tests/vm/tref.nim
+++ b/tests/vm/tref.nim
@@ -59,4 +59,13 @@ static:
 static: # bug #8402
   type R = ref object
   var empty: R
-  let otherEmpty = empty
\ No newline at end of file
+  let otherEmpty = empty
+
+block:
+  # fix https://github.com/timotheecour/Nim/issues/88
+  template fun() =
+    var s = @[10,11,12]
+    var a = s[0].addr
+    a[] += 100 # was giving SIGSEGV
+    doAssert a[] == 110
+  static: fun()