summary refs log tree commit diff stats
path: root/tests/compiles
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-08-14 21:28:14 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-08-14 21:28:14 +0200
commit531c66d1ec583a35d8d6bc637c94457fcd87a8e3 (patch)
tree291c76084f57b5a6fa0a643d51037c7f498fe507 /tests/compiles
parentc04404635b9efa2d6642887ca40f6222c54d9465 (diff)
downloadNim-531c66d1ec583a35d8d6bc637c94457fcd87a8e3.tar.gz
Allow taking address of skForVar variables (#8632)
Fixes #8630
Diffstat (limited to 'tests/compiles')
-rw-r--r--tests/compiles/t8630.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/compiles/t8630.nim b/tests/compiles/t8630.nim
new file mode 100644
index 000000000..aa2be11cd
--- /dev/null
+++ b/tests/compiles/t8630.nim
@@ -0,0 +1,13 @@
+discard """
+  output: '''
+foo
+bar
+'''
+"""
+
+proc test(strings: seq[string]) =
+  for s in strings:
+    var p3 = unsafeAddr(s)
+    echo p3[]
+
+test(@["foo", "bar"])