mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-25 16:53:59 +00:00
Deques compilation error fix (#5591)
This commit is contained in:
committed by
Andreas Rumpf
parent
d4b4cad4ea
commit
268a1f7cfd
17
tests/collections/tdeques.nim
Normal file
17
tests/collections/tdeques.nim
Normal file
@@ -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"
|
||||
Reference in New Issue
Block a user