summary refs log tree commit diff stats
path: root/tests/array/troof2.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-03-26 02:12:26 +0100
committerAraq <rumpf_a@web.de>2015-03-26 02:12:38 +0100
commit5d63ecb3a474a157f46019770c8288bb134e9aa9 (patch)
tree828d7f2ec73cdb10875ae9172827fed627ac729c /tests/array/troof2.nim
parent36b6bfaf78e3eeb5e6c7b17a2b55d904220c9fc6 (diff)
downloadNim-5d63ecb3a474a157f46019770c8288bb134e9aa9.tar.gz
implemented a[^1] notation
Diffstat (limited to 'tests/array/troof2.nim')
-rw-r--r--tests/array/troof2.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/array/troof2.nim b/tests/array/troof2.nim
new file mode 100644
index 000000000..d4c1a4982
--- /dev/null
+++ b/tests/array/troof2.nim
@@ -0,0 +1,10 @@
+discard """
+  errormsg: "invalid context for '^' as 'foo()' has side effects"
+  line: "9"
+"""
+
+proc foo(): seq[int] =
+  echo "ha"
+
+let f = foo()[^1]
+