mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
fixes #21278; deques.shrink off ny one bug
(cherry picked from commit b82b5d44af)
This commit is contained in:
@@ -183,6 +183,12 @@ proc main() =
|
||||
clear(a)
|
||||
doAssert len(a) == 0
|
||||
|
||||
block: # bug #21278
|
||||
var a = [10, 20, 30, 40].toDeque
|
||||
|
||||
a.shrink(fromFirst = 0, fromLast = 1)
|
||||
doAssert $a == "[10, 20, 30]"
|
||||
|
||||
|
||||
static: main()
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user