diff options
author | Dmitriy Fomichev <xomachiner@gmail.com> | 2017-03-24 02:09:51 +0300 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-03-24 00:09:51 +0100 |
commit | 268a1f7cfd9d99ed0bcd2b19f47c35eb7c979e2a (patch) | |
tree | f0dbe51c8a1d22699f4c1b9047bc1c8218878349 /tests/collections | |
parent | d4b4cad4ea14b0a51850d634fe1f1c12c3c04149 (diff) | |
download | Nim-268a1f7cfd9d99ed0bcd2b19f47c35eb7c979e2a.tar.gz |
Deques compilation error fix (#5591)
Diffstat (limited to 'tests/collections')
-rw-r--r-- | tests/collections/tdeques.nim | 17 |
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" |