summary refs log tree commit diff stats
path: root/lib
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 /lib
parentd4b4cad4ea14b0a51850d634fe1f1c12c3c04149 (diff)
downloadNim-268a1f7cfd9d99ed0bcd2b19f47c35eb7c979e2a.tar.gz
Deques compilation error fix (#5591)
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/collections/deques.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/collections/deques.nim b/lib/pure/collections/deques.nim
index d42679f06..78953228b 100644
--- a/lib/pure/collections/deques.nim
+++ b/lib/pure/collections/deques.nim
@@ -80,7 +80,7 @@ proc `[]`*[T](deq: Deque[T], i: Natural) : T {.inline.} =
   ## Access the i-th element of `deq` by order from first to last.
   ## deq[0] is the first, deq[^1] is the last.
   xBoundsCheck(deq, i)
-  return deq.data[(deq.first + i) and deq.mask]
+  return deq.data[(deq.head + i) and deq.mask]
 
 proc `[]`*[T](deq: var Deque[T], i: Natural): var T {.inline.} =
   ## Access the i-th element of `deq` and returns a mutable
@@ -266,4 +266,4 @@ when isMainModule:
   foo(1,1)
   foo(2,1)
   foo(1,5)
-  foo(3,2)
\ No newline at end of file
+  foo(3,2)