summary refs log tree commit diff stats
path: root/tests/collections
diff options
context:
space:
mode:
authorDmitriy Fomichev <xomachiner@gmail.com>2017-03-24 02:09:51 +0300
committerAndreas Rumpf <rumpf_a@web.de>2017-03-24 00:09:51 +0100
commit268a1f7cfd9d99ed0bcd2b19f47c35eb7c979e2a (patch)
treef0dbe51c8a1d22699f4c1b9047bc1c8218878349 /tests/collections
parentd4b4cad4ea14b0a51850d634fe1f1c12c3c04149 (diff)
downloadNim-268a1f7cfd9d99ed0bcd2b19f47c35eb7c979e2a.tar.gz
Deques compilation error fix (#5591)
Diffstat (limited to 'tests/collections')
-rw-r--r--tests/collections/tdeques.nim17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/collections/tdeques.nim b/tests/collections/tdeques.nim
new file mode 100644
index 000000000..664ce4324
--- /dev/null
+++ b/tests/collections/tdeques.nim
@@ -0,0 +1,17 @@
+discard """
+  output: '''true'''
+"""
+
+import deques
+
+
+proc index(self: Deque[int], idx: Natural): int =
+  self[idx]
+
+proc main =
+  var testDeque = initDeque[int]()
+  testDeque.addFirst(1)
+  assert testDeque.index(0) == 1
+
+main()
+echo "true"