summary refs log tree commit diff stats
path: root/tests/vm/tconst.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/tconst.nim')
-rw-r--r--tests/vm/tconst.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/vm/tconst.nim b/tests/vm/tconst.nim
index c2bcf78b5..5cfe7533e 100644
--- a/tests/vm/tconst.nim
+++ b/tests/vm/tconst.nim
@@ -42,6 +42,16 @@ template main() =
       discard (x, increment, a)
     mytemp()
 
+  block: # bug #12334
+    block:
+      const b: cstring = "foo"
+      var c = b
+      doAssert c == "foo"
+    block:
+      const a = "foo"
+      const b: cstring = a
+      var c = b
+      doAssert c == "foo"
 
 
 static: main()